Spring Boot 如何以 Web 应用的方式启动

在 Spring Boot 启动的时候,在进程完成后会自动退出。web

如何让 Spring Boot 以 Web 方式启动,而且进程不退出呢?spring


须要肯定下 Web 的这个依赖是否在你的依赖中。spring-boot

<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

若是没有的话,你须要讲上面的依赖添加到你的项目中。spa

而后再从新启动后,你会发现你的 Web 应用没有在完成后自动退出了。code

https://www.cwiki.us/display/SpringBootZH/questions/57938770blog

相关文章
相关标签/搜索