springboot新手脫坑之沒法下載依賴包

1. Apache maven 3.39配置

1.環境變量本身配置,html

 

2.配置阿里雲鏡像和本地倉庫app

<localRepository>D:\Apache\maven\repository</localRepository>


<mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>       
  </mirror>

3.profiles標籤添加maven

<profile>
		<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>
	    </profile>

4.idea配置ide

點擊->setting阿里雲

搜索mavenurl

點擊importing->勾選idea

settings->system settings->updata下面的Use secure Connetion去掉spa

點擊applycode

5.建立項目xml

建立完成以後發現pom.xml文件中標籤報錯消失

相關文章
相關標籤/搜索