前言
在配置spring-boot的maven時,軟件報錯:Plugin 'org.springframework.boot:spring-boot-maven-plugin:'not found
在CSDN和博客園博主智慧的幫助下,解決了這個問題,現將解決過程記錄下來,以作后續參考。
解決方案
在pom.xml中,我的原始配置如下:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
在maven庫中,發現了Repository\org\springframework\boot\spring-boot-maven-plugin存在相關插件2.1.7.RELEASE
在pom.xml上補充版本:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.7.RELEASE</version>
</plugin>
更新maven配置后,發現不再報此錯誤。
又有了一個新的報錯"Element 'plugin' cannot have character [children], because the type's content type is element-only"
通過參考博客園文章並檢查pom.xml后,發現在上一步添加的</version>
中我不小心多打了一個">"變成了</version>>
把多余的括號去掉后終於正常了。