项目打war包后忘了修改pom中的配置,启动项目控制台报错: Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!--去掉springboot自带的的tomcat-->
<!--<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>-->
</dependency>
<!--加上外部tomcat依赖包-->
<!-- <dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-servlet-api</artifactId>
<version>8.0.36</version>
<scope>provided</scope>
</dependency>-->
ps: 正常启动如上,打war包需要将上面注释的配置放开。

1万+

被折叠的 条评论
为什么被折叠?



