springboot项目启动后tomcat服务器自动关闭 解决方法

需要在pom.xml中添加

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
原文地址:https://www.cnblogs.com/jamers-rz/p/14076262.html