I was thinking of starting Spring Boot with IntelliJ, It was when I stumbled upon creating and running a project.
When I created a project in IntelliJ using Spring Inirializer and ran Run Application from main, the application quit immediately.
2018-03-13 20:45:42.270 INFO 7595 --- [ Thread-12] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
Process finished with exit code 0
Running from eclipse works fine, and running from gradle also works. .. .. For some reason it doesn't start from Run Application from IntelliJ. .. ..
It started by changing the dependency configuration of spring-boot-starter-tomcat in the dependencies of build.gradle from providedRuntime to compile.
build.gradle
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
// providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
compile('org.springframework.boot:spring-boot-starter-tomcat')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
There are people who are addicted to the same thing. Spring Boot app shuts down automatically
However, considering the actual operation, it seems better not to change the dependency configuration of spring-boot-starter-tomcat. Execute bootRun with gradle from IntelliJ to proceed with development. You can also debug.
Recommended Posts