springboot3从官网选择组件下载后,运行起来后又自动停止的问题
2.或者将tomcat内置的排除,再加上重新从tomcat官网下载的tomcat环境和依赖包,scope为provided。如果idea中配置了重新下载的tomcat10,(idea专业版才能找到tomcat server),idea 社区版没有。重新sync maven后,clean install后,外置的tomcat就可以跑起来了。Spring boot3.x 内置的tomcat和pom.x
·

Spring boot3.x 内置的tomcat和pom.xml中引入的tomcat冲突。1.将自己引入的删除。然后就直接可以跑起来了。2.或者将tomcat内置的排除,再加上重新从tomcat官网下载的tomcat环境和依赖包,scope为provided。排除内置的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>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
如果idea中配置了重新下载的tomcat10,(idea专业版才能找到tomcat server),idea 社区版没有。
重新sync maven后,clean install后,外置的tomcat就可以跑起来了。
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)