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>
相關文章
相關標籤/搜索