SpringBoot启动时:Process finished with exit code 0解决办法

首先启动时候:Process finished with exit code 0,这并不是报错了,意思是:这个表示程序正常执行完毕退出了。这就表示项目启动成功后了,此时运行,最后运行完毕自动退出。但我们是需要访问路径的,所以需要引入web  jar包

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

还需要@RestController等注解。