idea中的springboot项目打包成war包部署到tomcat中

时间:2025-03-26 09:47:59

> 这个是告诉springboot启动的时候用外部的tomcat进行启动,而不用自己内部的tomcat进行启动
> <!-- 不采用spring-boot自带的tomcat进行启动 -->
> <!-- <dependency>
> <groupId></groupId>
> <artifactId>spring-boot-starter-web</artifactId>
> <exclusions>
> <exclusion>
> <artifactId>log4j-over-slf4j</artifactId>
> <groupId>org.slf4j</groupId>
> </exclusion>
> <exclusion>
> <groupId></groupId>
> <artifactId>spring-boot-starter-tomcat</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> &lt;!&ndash; 本地启动需要&ndash;&gt;
> <dependency>
> <groupId></groupId>
> <artifactId>spring-boot-starter-tomcat</artifactId>
> <scope>provided</scope>
> </dependency>-->
>