0
点赞
收藏
分享

微信扫一扫

【Springboot】创建boot工程spring-boot-maven-plugin报红、出错_解决方案


解决spring-boot-maven-plugin依赖报红问题

可能原因一:

未添加parent中的version版本号

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

添加即可

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.0.2</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

可能原因二:

版本号不对应

更改版本号即可

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.0</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

可能原因三:

idea出错啦

有时候可能是idea自身的错误,这时候我们重启idea即可解决问题

tips:

每次更改后别忘记刷新maven工程




【Springboot】创建boot工程spring-boot-maven-plugin报红、出错_解决方案_版本号


举报

相关推荐

0 条评论