Why does Spring Boot web app close immediately after starting?

后端 未结 10 2320
南笙
南笙 2021-02-18 15:57

Using STS, if I import the \"Rest Service\" Getting Started project using the latest Spring Boot and choose \"Run As Spring Boot App\", it starts up, t

10条回答
  •  粉色の甜心
    2021-02-18 16:48

    I had this same issue. To make it work I had to adjust the pom.xml and comment-out the 'provided' scope for spring-boot-starter-tomcat artifact and update the dependencies.

    
        org.springframework.boot
        spring-boot-starter-tomcat
        
    
    

    Now it starts up as expected! Thanks to some of the other answers that put me on the right track.

提交回复
热议问题