欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

解決IDEA springboot"spring-boot-maven-plugin"報紅問題

 更新時間:2021年04月16日 11:50:00   作者:碼農(nóng)波哥  
這篇文章主要介紹了解決IDEA springboot"spring-boot-maven-plugin"報紅問題,本文給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下

使用環(huán)境

項目環(huán)境:Idea 2020.2.3、 Maven 3.6.3 、springboot 2.1.4

本人在創(chuàng)建springboot項目時spring-boot-maven-plugin 及Idea右側Plugins劃紅,導致項目啟動打包有問題。雖然項目能跑,但是后續(xù)開發(fā)中可能會出現(xiàn)不可預知的問題。太礙眼決定把它解決掉。

可能原因:

1、maven沒有刷新;
2、Maven插件下載速度太慢,從國外的中央倉庫下載;
3、也有可能是本地springboot版本問題等....

分析思路:

1、到倉庫中發(fā)現(xiàn)有這插件,然后clean install 以后reimport還是飄紅。

2、那我們找到Maven地址中的setting.xml中的mirrors標簽添加以下內(nèi)容,maven再次下載jar包時,idea中看到,從阿里云提供的地址下載,速度比中央倉庫快

<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
                      https://maven.apache.org/xsd/settings-1.0.0.xsd">
    <localRepository>C:\Users\xxx\.m2\repository</localRepository> <!--這個地方改成自己本地路徑-->
    <interactiveMode/>
    <offline/>
    <pluginGroups/>
    <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>repo1.maven.org</id> 
            <name>Repo1 Maven of https://repo1.maven.org/maven2/</name> 
            <url>https://repo1.maven.org/maven2/</url> 
            <mirrorOf>central</mirrorOf> 
        </mirror>
        <!--
        -->
    </mirrors>
    <proxies/>
    <profiles>
        <profile>
            <id>downloadSources</id>
            <properties>
                <downloadSources>true</downloadSources>
                <downloadJavadocs>true</downloadJavadocs>          
            </properties>
        </profile>
    </profiles>
    <activeProfiles>
      <activeProfile>downloadSources</activeProfile>
    </activeProfiles>
</settings>
<mirror> 
<id>alimaven</id> 
<name>aliyun maven</name> 
<url>http://maven.aliyun.com/nexus/content/groups/public/</url> 
<mirrorOf>central</mirrorOf> 
</mirror> 

但是以上兩個方法依然沒有解決,因為項目都是其它同事一直能跑起來過的,那就說明程序肯定沒問題。主要我之前也是跑得好好的,也就換了一下系統(tǒng),Idea版本也安裝到2020.2.3 版本而已,到此心里感覺到了崩潰的邊緣,只想說這是為什么......

然后實在找不到問題所在 ,最后試著改了改pom.xml文件

<version>2.2.2.RELEASE</version>

居然和版本有關系,問題就解決了。

有的網(wǎng)友說檢查maven倉庫地址,將改為C:\Users\xxx\.m2\repository,默認地址。大家也可以試試。這種問題可能還是本地版本不太對應導致,希望能幫助到大家。

也可以能有其他的問題,這方法不一定完全適應,僅供參考

如果大家有遇到Java-springboot的問題都可以加QQ群進行交流:Java技術交流群:554101646

到此這篇關于解決IDEA springboot"spring-boot-maven-plugin"報紅問題的文章就介紹到這了,更多相關"spring-boot-maven-plugin報紅內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!

相關文章

最新評論