代码都没问题,启动时应用无缘无故就是会出现Process finished with exit code 0,这个是什么意思呢,是应用程序正常退出的意思。
可以科普一下exit code:
exit code 0 表示程序执行成功,正常退出exit code 1 表示程序执行执行过程中遇到了某些问题或者错误,非正常退出
那出现这个问题怎么解决了,我弄了好久没找到原因,各种方法试过了,将maven清理了再重新加载也不行,最后发现是pom.xml文件中少了依赖,加上这依赖问题就解决了
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency>