springboot 给开发带来了很大的便利性,现在手上有项目客户要求部署到tomcat下,方便后续自己人员维护

首先排除springboot自带的tomcat依赖,不排除打包时会打入tomcat相关的jar文件

springboot 部署到tomcat

引入tomcat使用,但是打包时不需要 scope 设置 provided

springboot 部署到tomcat

启动Appliclation.java 重写 SpringBootServletInitializer 的 configure

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
    return builder.sources(Appliclation.class);
}

 

相关文章:

  • 2022-12-23
  • 2021-11-18
  • 2021-08-25
  • 2022-12-23
  • 2021-04-24
  • 2022-12-23
  • 2021-04-15
  • 2021-08-01
猜你喜欢
  • 2022-12-23
  • 2021-04-29
  • 2021-12-29
  • 2022-03-15
  • 2022-12-23
相关资源
相似解决方案