idea 错误: 找不到或无法加载主类 com.xxx.xxx.xxxx

  • 首先确定输出路径等配置没有问题File-->Project Structure-->Module
    在这里插入图片描述
    在这里插入图片描述
  • 然后刷新下maven或者重启idea,重新运行项目;如果还不能运行;可以清除idea缓存重启 File-->Invalidate Cache/Restart

在这里插入图片描述

  • 我的是刚搭建的环境,用了这个方法已经可以运行了
    在这里插入图片描述
发布了293 篇原创文章 · 获赞 174 · 访问量 106万+

猜你喜欢

转载自blog.csdn.net/baidu_19473529/article/details/104259470
今日推荐