配置springboot在外部容器中运行

1、排除springboot中默认容器支持

    
    
      org.springframework.boot
      spring-boot-starter-web
      
      
          
              org.springframework.boot
              spring-boot-starter-tomcat
          
      
    

2、加入servlet-api并去掉springboot对jsp支持

配置springboot在外部容器中运行_第1张图片

3、在入口类中加入如下配置:

配置springboot在外部容器中运行_第2张图片

 4、将项目打包(war)部署到外部容器即可,打的包在target下

配置springboot在外部容器中运行_第3张图片

你可能感兴趣的:(springboot)