spring项目报错: 找不到或无法加载主类 com.forezp.ConfigServerApplication
github地址:https://github.com/yueyue10/SpringCloudLearning/tree/master/sc-f-chapter7
使用方志朋大哥的代码,结果运行报错:找不到或无法加载主类.....
找了很久问题,中间过程就不说了。最后终于解决了,这里记录一下:
因为config-server工程里面的pom配置是:<packaging>pom</packaging>导致了这个问题。
修改为:<packaging>jar</packaging>既可正常运行。