czp3009 / blog

personal blog
GNU General Public License v3.0
4 stars 0 forks source link

正确打包Spring-Boot到war | czp's blog #12

Open czp3009 opened 5 years ago

czp3009 commented 5 years ago

https://www.hiczp.com/2018/10/16/java/%E6%AD%A3%E7%A1%AE%E6%89%93%E5%8C%85Spring-Boot%E5%88%B0war/

环境: Spring-Boot 2.0.5.RELEASE | gradle 4.10.2众所周知, Spring Boot 在开发时之所以能直接启动, 是因为内置了 tomcat. 同时这也使得 Spring Boot 可以直接输出为可执行的 jar 文件.那么问题来了, 如果我们需要将应用打包为 war 文件并部署到外部的 tomcat 服务器怎么办.在 Google 搜索这个问题, 就会看到