Я пробую простое приложение Spring Boot, оно всегда автоматически выключает < /p>
:: Spring Boot :: (v1.4.1.RELEASE)
2016-10-23 13:05:21.681 INFO 16532 --- [ main] com.example.RestBootApplication : No active profile set, falling back to default profiles: default
2016-10-23 13:05:21.766 INFO 16532 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@6e20b53a: startup date [Sun Oct 23 13:05:21 EDT 2016]; root of context hierarchy
2016-10-23 13:05:23.682 INFO 16532 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2016-10-23 13:05:23.704 INFO 16532 --- [ main] com.example.RestBootApplication : Started RestBootApplication in 2.632 seconds (JVM running for 5.168)
2016-10-23 13:05:23.705 INFO 16532 --- [ Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@6e20b53a: startup date [Sun Oct 23 13:05:21 EDT 2016]; root of context hierarchy
2016-10-23 13:05:23.708 INFO 16532 --- [ Thread-2] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
< /code>
pom.xml
4.0.0
com.example
demo
0.0.1-SNAPSHOT
jar
rest-boot
Demo project for Spring Boot
org.springframework.boot
spring-boot-starter-parent
1.4.1.RELEASE
UTF-8
UTF-8
1.8
org.springframework.boot
spring-boot-starter
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-test
test
org.springframework.boot
spring-boot-maven-plugin
< /code>
Основной класс < /p>
@SpringBootApplication
public class RestBootApplication {
public static void main(String[] args) {
SpringApplication.run(RestBootApplication.class, args);
}
}
< /code>
контроллер < /p>
@Controller
public class HelloController {
@RequestMapping("/hello")
String helloWorld(){
return "helloWorld";
}
}
< /code>
Попытка запустить в Spring Tool Suite. Это всегда останавливается после начала. Я даже добавил «Spring-Boot-Starter-Web» после просмотра некоторых вопросов StackOverflow, но все еще сталкиваясь с проблемой. /п>
Подробнее здесь: https://stackoverflow.com/questions/402 ... at-startup