问题
I've been trying to set up a new Spring Boot Web application using the following command:
spring init --java-version=1.7 --build=gradle --packaging=war --groupId=me.psychopunch.lab.springboot --artifactId=sample --name=quickstart sample
However, when I trying running the generated code using: gradle bootRun
, I build does not complete, and does not throw error either. I only get:
...
2016-01-11 22:44:28.127 INFO 3579 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2016-01-11 22:44:28.260 INFO 3579 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2016-01-11 22:44:28.266 INFO 3579 --- [ main] com.example.QuickstartApplication : Started QuickstartApplication in 5.312 seconds (JVM running for 6.091)
> Building 80% > :bootRun
The build gets stuck at around 80%. Sometimes it's 83%, 85%, etc. but it won't complete up to 100%. What am I doing wrong here?
回答1:
It's actually running that's what the Started QuickstartApplication in 5.312 seconds (JVM running for 6.091) indicate.
Ignore the > Building 80% > :bootRun. When you terminate the spring process some more cleanup things will run in gradle.
I have a pretty big build process, mine prints Started... at 96%. :)
It's perfectly normal.
来源:https://stackoverflow.com/questions/34724299/why-does-my-spring-boot-web-app-not-run-completely-in-gradle