SpringBoot2.7新建项目Maven下载依赖出错

/images/all/springboot-error.png

自行安装本地Maven,IDEA中修改下面红框中的三个位置,分别对应Maven的安装路径、settings.xml位置、本地repository的位置。

/images/all/local_maven.png

下面是我的Mavensettings.xmlMaven版本为3.6.3JDK版本为1.8SpringBoot版本为2.7.1,已换阿里源

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <localRepository>D:\apache-maven-3.6.3\repository</localRepository>

  <pluginGroups></pluginGroups>

  <proxies></proxies>

  <servers></servers>
  <mirrors>

    <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>https://maven.aliyun.com/repository/public</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
      <id>alimaven-central</id>
      <name>aliyun maven central</name>
      <url>https://maven.aliyun.com/repository/central</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
      <id>alimaven-spring</id>
      <name>aliyun maven-spring</name>
      <url>https://maven.aliyun.com/repository/spring</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
      <id>central</id>
      <name>Maven Repository Switchboard</name>
      <url>https://repo1.maven.org/maven2/</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
      <id>jboss-public-repository-group</id>
      <mirrorOf>central</mirrorOf>
      <name>JBoss Public Repository Group</name>
      <url>http://repository.jboss.org/nexus/content/groups/public</url>
    </mirror>
    <mirror>
      <id>spring-snapshots</id>
      <mirrorOf>central</mirrorOf>
      <name>Spring Snapshots</name>
      <url>https://repo.spring.io/snapshot</url>
    </mirror>
    <mirror>
      <id>spring-milestones</id>
      <mirrorOf>central</mirrorOf>
      <name>Spring Milestones</name>
      <url>https://repo.spring.io/milestone</url>
    </mirror>
    <mirror>
      <id>maven-default-http-blocker</id>
      <mirrorOf>external:http:*</mirrorOf>
      <name>Pseudo repository to mirror external repositories initially using HTTP.</name>
      <url>http://0.0.0.0/</url>
      <blocked>true</blocked>
    </mirror>
  </mirrors>


  <profiles>
    <id>jdk-1.8</id>
    <activation>
      <activeByDefault>true</activeByDefault>
      <jdk>1.8</jdk>
    </activation>

    <properties>
      <maven.compiler.source>1.8</maven.compiler.source>
      <maven.compiler.target>1.8</maven.compiler.target>
      <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
    </properties>

  </profiles>

</settings>