在创建springcloud项目后,新建一个springboot服务的时候,启动项目没有任何报错。但是,项目一启动后就退出了:Process finished with exit code 0,(程序执行完成)没有监听端口就退出了。
exit code 0 表示程序执行成功,正常退出
exit code 1 表示程序执行执行过程中遇到了某些问题或者错误,非正常退出
解决方法:Tomcat服务器没有启动。先检查是否引入web的starter依赖:
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency>
或者有可能是tomcat包有冲突。
版权归原作者 Nost�lgico? 所有, 如有侵权,请联系我们删除。