在 Spring Boot 啓動的時候,在進程完成後會自動退出。web
如何讓 Spring Boot 以 Web 方式啓動,而且進程不退出呢?spring
須要肯定下 Web 的這個依賴是否在你的依賴中。ide
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> |
若是沒有的話,你須要講上面的依賴添加到你的項目中。spring-boot
而後再從新啓動後,你會發現你的 Web 應用沒有在完成後自動退出了。進程
https://www.cwiki.us/display/SpringBootZH/questions/57938770get