idea打包spring boot项目 部署到tomcat

idea打包spring boot项目 部署到tomcat
打包类别,分为两种, jar包和war包, 需要在这里标明
idea打包spring boot项目 部署到tomcat
war包格式小在最后的build中配置package
idea打包spring boot项目 部署到tomcat
在build中配置入口主类名
idea打包spring boot项目 部署到tomcat
并且入口类继承springBootServletInitializer 重写configure方法
idea打包spring boot项目 部署到tomcat
如果是打成jar包, 选择 clean和 install 如果是war包 选择clean和package 直接进行打包!

idea打包spring boot项目 部署到tomcat
可以在编译结果目标路径下看到打出的包

idea打包spring boot项目 部署到tomcat
还要注意, 如果项目中有部分jar包并不是通过maven继承, 而是手动假如的第三方jar包, 在打包的时候并不会将jar包包含进去, 需要在pom.xml中配置项目内jar包依赖, 如上图:
idea打包spring boot项目 部署到tomcat
将三方jar包放到相应的位置
idea打包spring boot项目 部署到tomcat
并在bulid中配置打包是将项目内依赖jar包打包进去
最后打包完成
idea打包spring boot项目 部署到tomcat
最后将打出的war包放到tomcat中的webapps中,最后启动tomcat, 发现有可能会出现上面的错误 java.lang.NoClassDefFoundError: javax/el/ELManager
springboot默认jdk8 servlet3.0(tomcat8),直接将原本打出来的war包部署到tomcat8.0以上版本 解决,
可以通过配置发布到tomcat7中, 还没找到, 知道的可以指教指教!
还有可能tomcat 起来了 但是程序没跑起来
idea打包spring boot项目 部署到tomcat
看了下打的war包 依赖的三方库jar包还是没打进去, 在lib-provided中, 将这个jar放到lib中重新部署, 就可以, 大神们看到这个问题, 希望能指教!

注 纠正错误 :将三方库的本地jar包打到WEB-INF/lib中添加pom配置 插件
idea打包spring boot项目 部署到tomcat
其中, 是jar包所在的路径, 表示将jar包打到的目标目录
idea打包spring boot项目 部署到tomcat
将红框内的配置删除, 这个配置是将jar包打到war中, 但是位置不对, 打到的位置是WEB-INF/lib-provided位置, 部署tomcat, 读不到jar包