springboot启动后自动退出

有时新建的springboot启动后自动退出运行,如图所示:spring

此种状况大都数是由于pom文件加入了tomcat的依赖,与springboot内嵌的tomcat冲突致使,因此只需将pom文件中的tomcat依赖去除便可。即tomcat

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <scope>provided</scope>
</dependency>
相关文章
相关标签/搜索