springboot项目简单demo启动就结束,解决方法

1:配置yml文件

server:
  port: 8080
  servlet:
    context-path: /

2:需要添加有容器,类似tomcat,添加依赖

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

猜你喜欢

转载自blog.csdn.net/qq_19891197/article/details/130844116
今日推荐