一、問題描述
換了一臺電腦,重新進行idea安裝配置。然后打開原來的項目結果引入spring-boot-maven-plugin出現爆紅,而且spring-boot-starter-parent也不能引入。
二、解決辦法
1.檢查環境配置,主要是settings.xml此文件配置情況是否正確,是否加入阿里云鏡像。最好用idea工具打開檢查一下是否規范,此次我的問題就出在settings.xml報錯了(網上隨意復制粘貼了一個)。settings.xml配置文件以及idea工具打開查看的方式如下所示。
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
|
<? 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>E:\maven\repository</localRepository>--> <!-- 配置下載Jar包的鏡像倉庫地址 --> < mirrors > < mirror > < id >alimaven</ id > < name >aliyun maven</ name > < url >http://maven.aliyun.com/nexus/content/groups/public/</ url > < mirrorOf >central</ mirrorOf > </ mirror > < mirror > < id >uk</ id > < name >Human Readable Name for this Mirror.</ name > < url >http://uk.maven.org/maven2/</ url > < mirrorOf >central</ mirrorOf > </ mirror > < mirror > < id >nexus</ id > < name >internal nexus repository</ name > < url >http://repo.maven.apache.org/maven2</ url > < mirrorOf >central</ mirrorOf > </ mirror > </ mirrors > < profiles > <!-- 下載源代碼和Javadoc --> < profile > < id >downloadSources</ id > < properties > < downloadSources >true</ downloadSources > < downloadJavadocs >true</ downloadJavadocs > </ properties > </ profile > </ profiles > <!-- 激活在profiles的配置項 --> < activeProfiles > < activeProfile >downloadSources</ activeProfile > </ activeProfiles > </ settings > |
2.檢查代碼是否出錯,加上具體版本號。
參考:https://blog.csdn.net/weixin_41988224/article/details/104388981
到此這篇關于spring-boot-maven-plugin引入出現爆紅(已解決)的文章就介紹到這了,更多相關spring-boot-maven-plugin爆紅內容請搜索服務器之家以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持服務器之家!
原文鏈接:https://blog.csdn.net/qq_44654974/article/details/114459162