今天使用新电脑部署Springboot环境时出现了spring-boot-maven-plugin未加载上提醒,起初以为Mac未越狱之类的问题,后来仔细研究了几个安装的教学视频发现,主要问题出在maven的settings.xml配置上。
我的setting.xml配置的镜像配繁琐了,改成阿里云的镜像其实就好了:
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
之后我又检查了一番,在settings.xml文件中配置本地仓库的路径(也可使用默认的路径),我这里配置的路径:
<localRepository>/Users/wenyunxin/Downloads/work/tool/apache-maven-3.6.3/repository</localRepository>
最后在idea中将maven的环境配置好,如图:
保存以上操作后,在pom.xml文件上右键->maven->Reimport重新加载一遍以上配置,spring-boot-maven-plugin插件就好了。
学而不思则罔,思而不学则怠