Collection of Spring Boot Getting Started Questions

Problem: The entry demo exported from start.spring.io is not easy to use when introduced into sts. The following is the error log.

main] i.a.hellospringboot.CourseApiApp         : Starting CourseApiApp on johndoe-MacBook-Pro.local with PID 22730 (/Users/johndoe/Documents/workspace-sts-3.8.4.RELEASE/com.myapp.hello-spring-boot/target/classes started by john doe in /Users/johndoe/Documents/workspace-sts-3.8.4.RELEASE/com.myapp.hello-spring-boot)
2017-05-02 21:28:29.454  INFO 22730 --- [           main] i.a.hellospringboot.CourseApiApp         : No active profile set, falling back to default profiles: default
2017-05-02 21:28:29.552  INFO 22730 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@5427c60c: startup date [Tue May 02 21:28:29 CDT 2017]; root of context hierarchy
2017-05-02 21:28:30.838  INFO 22730 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2017-05-02 21:28:30.917  INFO 22730 --- [           main] i.a.hellospringboot.CourseApiApp         : Started CourseApiApp in 2.122 seconds (JVM running for 2.614)
2017-05-02 21:28:30.919  INFO 22730 --- [       Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@5427c60c: startup date [Tue May 02 21:28:29 CDT 2017]; root of context hierarchy
2017-05-02 21:28:30.920  INFO 22730 --- [       Thread-2] o.s.j.e.a.AnnotationMBeanExporter  : Unregistering JMX-exposed beans on shutdown      

Solution:
1. Add web dependencies
2. Add tomcat dependencies
3. Clean up conflicting dependencies in the maven repository
mvn dependency:purge-local-repository

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325768007&siteId=291194637