【问题标题】:spring initializr 2.3.x removed删除了 spring initializr 2.3.x
【发布时间】:2021-07-30 09:22:48
【问题描述】:

Spring Boot 2.3.12.RELEASE 于 2021 年 6 月 10 日发布,并于 7 月从“spring initializr”页面 (https://start.spring.io/) 中删除。

我的问题:

  1. 2.3.x 是否已弃用?
  2. 如果我想为2.3.12版本生成一个新的Spring Boot项目,我该怎么做?它不再可以从“spring initializr”页面完成。

【问题讨论】:

  • pom.xml更改版本。
  • spring initializr 还可以帮助我们选择其他启动器依赖项,例如。春云项目。如果我们手动进行,那么为它选择正确的版本可能不是直截了当的。这是否意味着,生成 2.3.x 的 Spring Boot 项目(其中可能包括 Spring Cloud)并不容易?

标签: spring spring-boot spring-cloud spring-initializr


【解决方案1】:

2.3.x 已经弃用了吗?

是的。 Spring Boot 2.3.x 已从 https://start.spring.io 中删除为 2.3.x reached the end of its open source support period on 15 May 2021

如果我想为2.3.12版本生成一个新的Spring Boot项目,我该怎么做?

理想情况下,您不应该这样做。任何使用 Spring Boot 2.3.x 的现有项目都应尽快更新到 2.4.x 或 2.5.x,新项目应从一开始就使用 2.4.x 或 2.5.x。

如果您必须使用不受支持的 Spring Boot 版本启动新项目,您可以生成项目,然后修改 pom.xmlbuild.gradle 文件中的版本以降级版本。版本不受支持的时间越长,这可能就越难做到。

如果您使用的是 Spring Cloud,可以使用 start.spring.io 的info endpoint 来帮助进行版本映射:

…
"spring-cloud": {
    "2020.0.0": "Spring Boot >=2.4.0.M4 and <=2.4.0",
    "2020.0.0-M3": "Spring Boot >=2.4.0.M1 and <=2.4.0.M1",
    "2020.0.0-M4": "Spring Boot >=2.4.0.M2 and <=2.4.0-M3",
    "2020.0.3": "Spring Boot >=2.4.1 and <2.5.4-SNAPSHOT",
    "2020.0.4-SNAPSHOT": "Spring Boot >=2.5.4-SNAPSHOT",
    "Hoxton.SR12": "Spring Boot >=2.2.0.RELEASE and <2.4.0.M1"
},
…

以上说明 Spring Cloud Hoxton.SR12 应与 Spring Boot 2.3.x(和 2.2.x)一起使用。

请注意Spring Cloud Hoxton is also out of its OSS support period,因此您确实应该考虑升级到 Spring Boot 2.4.x 或 2.5.x 和 Spring Cloud 2020.0.x。

【讨论】:

    【解决方案2】:

    Answer-1:查看@andy-wilkinson 的answer
    Answer-2:您可以使用 Spring-CLI

    步骤:

    1. 安装Spring-CLI
    2. 运行以下命令

    spring init --boot-version=2.3.12.RELEASE --dependencies=web,data-jpa 旧启动项目

    有关 Spring-CLI 的更多信息。请查看官方文档here

    【讨论】:

      猜你喜欢
      • 2019-08-03
      • 2016-01-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-23
      • 2015-12-05
      • 1970-01-01
      • 2020-05-25
      相关资源
      最近更新 更多