SpringBoot与SpringCloud的版本对应详细版

在实际开发过程中,我们需要详细到一一对应的版本关系:Spring 官方对应版本地址:  (https://start.spring.io/actuator/info),建议用firefox浏览器打开,你会看见格式化好了json信息:

 

 

{
    "git":{
        "branch":"3e2ac1abc157e25c68b39b7e03b1bfc1e23adae9",
        "commit":{
            "id":"3e2ac1a",
            "time":"2021-01-08T15:21:25Z"
        }
    },
    "build":{
        "version":"0.0.1-SNAPSHOT",
        "artifact":"start-site",
        "versions":{
            "spring-boot":"2.4.1",
            "initializr":"0.10.0-SNAPSHOT"
        },
        "name":"start.spring.io website",
        "time":"2021-01-08T15:23:24.751Z",
        "group":"io.spring.start"
    },
    "bom-ranges":{
        "azure":{
            "2.0.10":"Spring Boot >=2.0.0.RELEASE and <2.1.0.RELEASE",
            "2.1.10":"Spring Boot >=2.1.0.RELEASE and <2.2.0.M1",
            "2.2.4":"Spring Boot >=2.2.0.M1 and <2.3.0.M1",
            "3.0.0":"Spring Boot >=2.3.0.M1 and <2.4.0-M1"
        },
        "codecentric-spring-boot-admin":{
            "2.0.6":"Spring Boot >=2.0.0.M1 and <2.1.0.M1",
            "2.1.6":"Spring Boot >=2.1.0.M1 and <2.2.0.M1",
            "2.2.4":"Spring Boot >=2.2.0.M1 and <2.3.0.M1",
            "2.3.1":"Spring Boot >=2.3.0.M1 and <2.5.0-M1"
        },
        "solace-spring-boot":{
            "1.0.0":"Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
            "1.1.0":"Spring Boot >=2.3.0.M1 and <2.5.0-M1"
        },
        "solace-spring-cloud":{
            "1.0.0":"Spring Boot >=2.2.0.RELEASE and <2.3.0.M1",
            "1.1.1":"Spring Boot >=2.3.0.M1 and <2.5.0-M1"
        },
        "spring-cloud":{
            "Finchley.M2":"Spring Boot >=2.0.0.M3 and <2.0.0.M5",
            "Finchley.M3":"Spring Boot >=2.0.0.M5 and <=2.0.0.M5",
            "Finchley.M4":"Spring Boot >=2.0.0.M6 and <=2.0.0.M6",
            "Finchley.M5":"Spring Boot >=2.0.0.M7 and <=2.0.0.M7",
            "Finchley.M6":"Spring Boot >=2.0.0.RC1 and <=2.0.0.RC1",
            "Finchley.M7":"Spring Boot >=2.0.0.RC2 and <=2.0.0.RC2",
            "Finchley.M9":"Spring Boot >=2.0.0.RELEASE and <=2.0.0.RELEASE",
            "Finchley.RC1":"Spring Boot >=2.0.1.RELEASE and <2.0.2.RELEASE",
            "Finchley.RC2":"Spring Boot >=2.0.2.RELEASE and <2.0.3.RELEASE",
            "Finchley.SR4":"Spring Boot >=2.0.3.RELEASE and <2.0.999.BUILD-SNAPSHOT",
            "Finchley.BUILD-SNAPSHOT":"Spring Boot >=2.0.999.BUILD-SNAPSHOT and <2.1.0.M3",
            "Greenwich.M1":"Spring Boot >=2.1.0.M3 and <2.1.0.RELEASE",
            "Greenwich.SR6":"Spring Boot >=2.1.0.RELEASE and <2.1.999.BUILD-SNAPSHOT",
            "Greenwich.BUILD-SNAPSHOT":"Spring Boot >=2.1.999.BUILD-SNAPSHOT and <2.2.0.M4",
            "Hoxton.SR9":"Spring Boot >=2.2.0.M4 and <2.3.8.BUILD-SNAPSHOT",
            "Hoxton.BUILD-SNAPSHOT":"Spring Boot >=2.3.8.BUILD-SNAPSHOT and <2.4.0.M1",
            "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.0":"Spring Boot >=2.4.0.M4 and <2.4.2-SNAPSHOT",
            "2020.0.1-SNAPSHOT":"Spring Boot >=2.4.2-SNAPSHOT"
        },
        "spring-cloud-alibaba":{
            "2.2.1.RELEASE":"Spring Boot >=2.2.0.RELEASE and <2.3.0.M1"
        },
        "spring-cloud-gcp":{
            "2.0.0-RC2":"Spring Boot >=2.4.0-M1 and <2.5.0-M1"
        },
        "spring-cloud-services":{
            "2.0.3.RELEASE":"Spring Boot >=2.0.0.RELEASE and <2.1.0.RELEASE",
            "2.1.8.RELEASE":"Spring Boot >=2.1.0.RELEASE and <2.2.0.RELEASE",
            "2.2.6.RELEASE":"Spring Boot >=2.2.0.RELEASE and <2.3.0.RELEASE",
            "2.3.0.RELEASE":"Spring Boot >=2.3.0.RELEASE and <2.4.0-M1"
        },
        "spring-geode":{
            "1.2.12.RELEASE":"Spring Boot >=2.2.0.M5 and <2.3.0.M1",
            "1.3.7.RELEASE":"Spring Boot >=2.3.0.M1 and <2.4.0-M1",
            "1.4.0":"Spring Boot >=2.4.0-M1"
        },
        "spring-statemachine":{
            "2.0.0.M4":"Spring Boot >=2.0.0.RC1 and <=2.0.0.RC1",
            "2.0.0.M5":"Spring Boot >=2.0.0.RC2 and <=2.0.0.RC2",
            "2.0.1.RELEASE":"Spring Boot >=2.0.0.RELEASE"
        },
        "vaadin":{
            "10.0.17":"Spring Boot >=2.0.0.M1 and <2.1.0.M1",
            "14.4.5":"Spring Boot >=2.1.0.M1 and <2.5.0-M1"
        },
        "wavefront":{
            "2.0.2":"Spring Boot >=2.1.0.RELEASE and <2.4.0-M1",
            "2.1.0-RC1":"Spring Boot >=2.4.0-M1 and <2.4.2-SNAPSHOT",
            "2.1.0-SNAPSHOT":"Spring Boot >=2.4.2-SNAPSHOT"
        }
    },
    "dependency-ranges":{
        "okta":{
            "1.2.1":"Spring Boot >=2.1.2.RELEASE and <2.2.0.M1",
            "1.4.0":"Spring Boot >=2.2.0.M1 and <2.4.0-M1",
            "1.5.1":"Spring Boot >=2.4.0-M1 and <2.4.1",
            "2.0.0":"Spring Boot >=2.4.1 and <2.5.0-M1"
        },
        "mybatis":{
            "2.0.1":"Spring Boot >=2.0.0.RELEASE and <2.1.0.RELEASE",
            "2.1.4":"Spring Boot >=2.1.0.RELEASE and <2.5.0-M1"
        },
        "camel":{
            "2.22.4":"Spring Boot >=2.0.0.M1 and <2.1.0.M1",
            "2.25.2":"Spring Boot >=2.1.0.M1 and <2.2.0.M1",
            "3.3.0":"Spring Boot >=2.2.0.M1 and <2.3.0.M1",
            "3.5.0":"Spring Boot >=2.3.0.M1 and <2.4.0-M1",
            "3.7.0":"Spring Boot >=2.4.0.M1 and <2.5.0-M1"
        },
        "open-service-broker":{
            "2.1.3.RELEASE":"Spring Boot >=2.0.0.RELEASE and <2.1.0.M1",
            "3.0.4.RELEASE":"Spring Boot >=2.1.0.M1 and <2.2.0.M1",
            "3.1.1.RELEASE":"Spring Boot >=2.2.0.M1 and <2.4.0-M1"
        }
    }
}

 

 

 手动记录一些经本人实际验证可行的版本对应:

No.1
<spring-boot.version>2.4.0</spring-boot.version>
<spring-cloud.version>2020.0.0-M6</spring-cloud.version>
No.2
<spring-boot.version>2.4.1</spring-boot.version>
<spring-cloud.version>2020.0.0-M6</spring-cloud.version>

 

spring-cloud-dependencies 版本列表可查看:  

https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies

spring-boot-starter-parent 版本列表可查看:

https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent

 

 到spring官方下载最新的springboot 与 springcloud版本对应代码example:    https://start.spring.io/

 end!

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
好的,如果你使用的是 Spring Boot 2.1.8.RELEASE,那么你需要使用 Spring Cloud Greenwich 版本的依赖。你可以在你的 pom.xml 文件中添加以下依赖来引入 Spring Cloud Greenwich 版本的 OpenFeign: ``` <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-openfeign</artifactId> <version>Greenwich.SR3</version> </dependency> ``` 如果你已经引入了正确版本的依赖,但是仍然遇到了问题,可以尝试以下解决方案: 1. 确保你的 `@SpringBootApplication` 注解所在的类的包路径是正确的。如果你的 `@SpringBootApplication` 注解所在的类位于根包路径下,而其他组件的包路径却不是根包路径下,那么你需要在启动类上添加 `@ComponentScan` 注解,来指定其他组件的包路径,例如: ``` @SpringBootApplication @ComponentScan(basePackages = "com.example.other") public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } } ``` 2. 确保你的 `@EnableFeignClients` 注解所在的类的包路径是正确的。同样的,如果你的 `@EnableFeignClients` 注解所在的类位于根包路径下,而其他组件的包路径却不是根包路径下,那么你需要在 `@EnableFeignClients` 注解中指定其他组件的包路径,例如: ``` @SpringBootApplication @EnableFeignClients(basePackages = "com.example.other") public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } } ``` 3. 确保你的 Feign 接口定义的路径是正确的。例如,如果你的 Feign 接口定义的路径是 `/api/service`,那么你的请求 URL 应该是 `http://localhost:8080/api/service`,而不是 `http://localhost:8080/service`。 希望这些解决方案能够帮助你解决问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

天秤座的架构师

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值