常规的解决方法其他博主已经发过很多了,在此我就不一一赘述了。我向大家介绍一下我遇到的问题吧。
起初我也以为时idea的问题,于是我就重启了很多遍,也刷新了很多遍插件。当然,我也试过更改jdk版本和增加<version>标签以及maven仓库(可能与之有关)也毫无作用。最后,我在其他博主的文章里看到了阿里云私服,于是我就对照着其他博主的settings.xml文件更改了我mirror配置。我的原始配置如下,
<mirror>
<id>maven-default-http-blocker</id>
<mirrorOf>external:http:*</mirrorOf>
<name>Pseudo repository to mirror external repositories initially using HTTP.</name>
<blocked>true</blocked>
</mirror>
更改后配置
![](https://img-blog.csdnimg.cn/img_convert/0041af81d522311f3fc51e4482b6e7ec.png)
未更改之前,我的idea一直在后台加载配置文件,大概十分多钟还是加载中,spring-boot-maven-plugin还是爆红,但是更改后可能是由于阿里云私服下载快,很快就不爆红了。但是需要给spring-boot-maven-plugin加上与spring-boot-starter-parent相同的version。如图为spring-boot-starter-parent的配置
![](https://img-blog.csdnimg.cn/img_convert/d13e76cd0bd4db63f08e30a6e486e5e4.png)
spring-boot-maven-plugin配置。此时增加<version>不再报错
![](https://img-blog.csdnimg.cn/img_convert/09e3fcaaae5f20558a8fc796fa5534f9.png)
删除<version>也不会报错
![](https://img-blog.csdnimg.cn/img_convert/2aec1e7334a2c9c9c8d5478418fe5fb2.png)
第一次发文章,如果对您有帮助,希望您可以点赞收藏一下。谢谢!