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
I found the reason for this to happen. Mine was that I did not include any library which brings in the tomcat runtime with it. I included the spring-web dependency and spring-boot-starter-data-jpa(shown below) but none of these packages will bring the tomcat runtime for this app to run. So, it was auto shutdown.
org.springframework.boot
spring-boot-starter-data-jpa
org.springframework.boot
spring-web
The solution was to change the spring-web to spring-boot-starter-web(shown below). This library brings in the tomcat library and my app started.
org.springframework.boot
spring-boot-starter-data-jpa
org.springframework.boot
spring-boot-starter-web