springboot去除内嵌tomcat

springboot去除内嵌tomcat步骤

在pom文件中加入以下代码

点击查看代码
<!-- 多模块排除内置tomcat -->
<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-web</artifactId>
	<exclusions>
		<exclusion>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-tomcat</artifactId>
		</exclusion>
	</exclusions>
</dependency>
		
<!-- 单应用排除内置tomcat -->		
<exclusions>
	<exclusion>
		<artifactId>spring-boot-starter-tomcat</artifactId>
		<groupId>org.springframework.boot</groupId>
	</exclusion>
</exclusions>

文章到这里就结束了,给个关注吧

posted @ 2023-11-22 09:06  锅巴编程  阅读(506)  评论(0编辑  收藏  举报