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
In addition, you should check that you have at least one rest controller in your app (@RestController) and make sure you compile with spring-boot-starter-tomcat
providedRuntime ('org.springframework.boot:spring-boot-starter-tomcat')
In my case the log4j.properties was missing.
In my case, I had a syntax error in application.properties
:
application.password.numberOfLoginAttempts=5;
The semicolon at the end caused Spring to shutdown silently with error code 0
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.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--<scope>provided</scope>-->
</dependency>
Now it starts up as expected! Thanks to some of the other answers that put me on the right track.