关于idea中pom文件springboot-parent-starter依赖报红问题

使用springboot官方方法创建的springboot项目,不存在依赖不存在问题,因此该问题不应采用换依赖方法解决。

具体原因如下:

spring-boot-starter-parent下面的版本报红时并不是这个版本不存在,

而是因为idea会默认缓存Maven本地仓库已存在的中的依赖项。

只是我们引入的的父依赖版本 本地仓库中不存在,所以就报错了,解决方案就是我们清除一下缓存重新启动,使用 Invalidate Caches/Restart

补充:spring-boot-maven-plugin报红时,给他加上版本号,和parent版本一致。这个是打jar包插件的配置

被这个坑得有点惨,找了各种办法,什么换 aliyun镜像啊,使用proxy什么的都试过,结果还不行。

幸运的是在一个评论中看到了此方法有效,所以记录了下来,希望能帮到大家

转载自:https://www.cnblogs.com/code-xu/p/14521200.html

  • 9
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Spring Boot项目的pom.xml文件parent依赖项用于指定项目的父级依赖。引用提到的spring-boot-starter-parentSpring Boot官方提供的一个父级依赖,它包含了许多默认的配置和插件,可以方便地创建和构建Spring Boot项目。这个父级依赖主要用于简化项目配置和提供一致性的构建环境。 而spring-boot-parentSpring Boot老版本使用的父级依赖,不过在当前的Spring Boot版本已经不再推荐使用。所以,spring-boot-starter-parent是更常用和推荐的选择,它提供了更多的功能和更新的版本。 总的来说,spring-boot-starter-parent是官方推荐和常用的Spring Boot父级依赖,而spring-boot-parent是老版本的父级依赖。因此,如果你正在使用较新的Spring Boot版本,建议使用spring-boot-starter-parent来构建你的项目。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [spring-boot-starter-parent-1.5.13.RELEASE.zip](https://download.csdn.net/download/a1135318908/12292638)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [elasticjob-spring-boot-starter:elasticjob-spring-boot-starter](https://download.csdn.net/download/weixin_42120563/16210105)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [IDEA创建springboot项目spring-boot-starter-parentspring-boot-starter-web爆红「简单」](https://blog.csdn.net/m0_62600503/article/details/127854979)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值