https://blog.csdn.net/u013985664/article/details/79636638
1.利用Maven-Reimport
2.Invalidate and Restart
3.编码统一
4.重新编译
点开Project Structure 找到项目编译输出目录
将target目录下文件清空
右键项目重新build
5.利用Maven-Install
看到评论中有不少同学说
Maven-Install
解决了问题,这里给大家列出以免没看到评论的同学错过解决问题的方法。部分由于依赖服务或者自身并没有加载至本地仓库而导致这个问题的,可以通过Maven-Install
的方法尝试解决。
关于mvn install
大家可以通过IDEA自带的可视化插件界面或者命令行模式执行都可以。关于这个不熟悉的话可以自行百度一下。