使用场景:使用idea搭建springboot项目使,出现报错情况
错误: 找不到或无法加载主类 com.example.demo7.Demo7Application
解决方案:
方法一:取消勾选“将IDE构建/运行操作委托给Maven”
使用步骤:File ==> Setting ==>
Build,Execution,Deployment ==> Build Tools ==> Maven ==>
Runner ==> 取消勾选Delegate IDE build/run actions to Maven


如果不想每次搭建springboot都设置一回,则需要在IDEA界面中设置


方法二:使用命令行解决
将maven重新部署项目,安装,运行
mvn clean compile
mvn install
mvn spring-boot:run









![[附源码]计算机毕业设计校园代取快递系统Springboot程序](https://img-blog.csdnimg.cn/42c57f5301f549cdb1d0c89f225c93a1.png)






![[附源码]计算机毕业设计网上鲜花购物系统Springboot程序](https://img-blog.csdnimg.cn/daa309c783fe45439d301c5cefa1c0ee.png)

![[附源码]计算机毕业设计基于SpringBoot的党务管理系统](https://img-blog.csdnimg.cn/ecb6f2d98eb74baf80dc334ede819a74.png)

