降低spring boot的版本号

当我们需要降低springboot的版本时需要将

 标签<dependencies>中的所有美容注解掉,如果不注解将会报错Could not find artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.5 in central (https://repo.maven.apache.org/maven2)

在注解掉标签<dependencies>之后在修改有关spring boot 的版本号,

然后在将标签<dependencies>放开。等待下载完成 就可以了。

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
您可以通过以下步骤在IntelliJ IDEA中降低Spring Boot的版本: 1. 首先,创建一个新的Spring Boot项目。在创建项目的过程中,您可以选择一个较新的版本,因为IDEA默认提供的是最新的版本。 2. 在项目文件构建完成后,打开pom.xml文件。 3. 在pom.xml文件中,找到单元测试部分的dependency。在这个例子中,您可以找到以下代码块: ``` <!--降级需要先将单元测试注释--> <!--<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> <exclusions> <exclusion> <groupId>org.junit.vintage</groupId> <artifactId>junit-vintage-engine</artifactId> </exclusion> </exclusions> </dependency>--> ``` 4. 将这段代码块注释掉,即把`<dependency>`和`</dependency>`之间的代码用`<!--`和`-->`注释起来。 5. 然后,修改pom.xml文件中的Spring Boot版本号为您想要降低版本号。在这个例子中,您可以找到以下代码块: ``` <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.1.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> ``` 将`<version>`标签中的版本号改为您想要降低版本号。 6. 保存pom.xml文件。 这样,您就成功将Spring Boot版本降低了。请注意,降低版本可能会导致某些功能不可用或不兼容,因此请确保您知道降低版本的后果。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值