背景:
通过maven创建springboot时,在pom.xml文件中引入了一下代码
PS:maven配置详解:https://www.cnblogs.com/xd502djj/p/13259759.html

<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.6.RELEASE</version> </parent> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> </dependencies>
结果就爆红,百度了一下,按照之前说的改动没有解决
后来删掉本地 .m2文件夹下的setting.xml文件中多余的<mirror>配置,只保留了阿里云的镜像,再看idea里面已经没有报错了
<mirrors> <!-- mirror | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. | --> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors>