<build>中的spring-boot-maven-plugin爆红,更新依赖会报错

<build>中的spring-boot-maven-plugin爆红,更新依赖会报错

https://img1.sycdn.imooc.com//climg/63249a01091987ec11770616.jpg

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.1.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.imooc</groupId>
    <artifactId>spring-boot-learn</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>spring-boot-learn</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>1.8</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

1回答
好帮手慕小脸 2022-09-17 10:19:17

同学你好,出现爆红现象,说明没有加载成功,这里建议同学刷新右侧Maven试试

https://img1.sycdn.imooc.com//climg/63252e920986209004380244.jpg

祝学习愉快~

  • 提问者 HelloWord996 #1

    老师,点击右侧maven刷新,还是不行

    https://img1.sycdn.imooc.com//climg/63254caf09d3a4ea13030591.jpg

    2022-09-17 12:27:31
  • 好帮手慕小脸 回复 提问者 HelloWord996 #2

    同学你好,去本地仓库删除对应的spring-boot-maven-plugin文件夹中的内容

    https://img1.sycdn.imooc.com//climg/632558d90939e9a606060417.jpg

    然后在pom.xml文件中剪切上述报红的内容,并重新引入,最后点击右侧Maven刷新再试试或右键项目名选择Maven--Reimport

    祝学习愉快~

    2022-09-17 13:19:37
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师