101

I am wondering if a compatibility matrix exists between Springboot and Springcloud?

I created a simple project on STS and am running into compatibility issues.

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


<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Camden.SR5</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Having a good view of the supported versions of both Springboot and Springcloud will make things simpler.

I did observe an open issue that talks about this need - https://github.com/spring-cloud/spring-cloud-build/issues/43

Does the community have an approach on how they choose to get started on a specific version combination when they embark on a SpringCloud project?

Edit: Adding another instance of such a problem that I encountered since yesterday

snippets from pom.xml

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


    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <!-- <version>Camden.SR6</version -->
                <!-- <version>Brixton.SR5</version> -->
                <!--  <version>Camden.SR6</version> -->
                <version>Camden.SR5</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

There are no maven errors in using 1.5.2.RELEASE with Camden.SR5 however when the app starts it throws the NoClassDefFoundError.

2017-03-28 09:51:15.148 ERROR 15808 --- [           main] o.s.boot.SpringApplication               : Application startup failed

java.lang.NoClassDefFoundError: org/springframework/cloud/context/named/NamedContextFactory$Specification
    at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.8.0_112]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[na:1.8.0_112]
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.8.0_112]
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) ~[na:1.8.0_112]
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[na:1.8.0_112]
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368) ~[na:1.8.0_112]
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362) ~[na:1.8.0_112]
    at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_112]
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361) ~[na:1.8.0_112]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_112]
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_112]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_112]
    at org.springframework.cloud.netflix.feign.FeignClientsRegistrar.registerClientConfiguration(FeignClientsRegistrar.java:367) ~[spring-cloud-netflix-core-1.2.5.RELEASE.jar:1.2.5.RELEASE]
    at org.springframework.cloud.netflix.feign.FeignClientsRegistrar.registerDefaultConfiguration(FeignClientsRegistrar.java:104) ~[spring-cloud-netflix-core-1.2.5.RELEASE.jar:1.2.5.RELEASE]
    at org.springframework.cloud.netflix.feign.FeignClientsRegistrar.registerBeanDefinitions(FeignClientsRegistrar.java:87) ~[spring-cloud-netflix-core-1.2.5.RELEASE.jar:1.2.5.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:352) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:143) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:320) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:228) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:270) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:93) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:686) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:524) ~[spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.2.RELEASE.jar:1.5.2.RELEASE]
    at com.forecastessentials.school.SchoolUniformForecastApplication.main(SchoolUniformForecastApplication.java:12) [classes/:na]
Caused by: java.lang.ClassNotFoundException: org.springframework.cloud.context.named.NamedContextFactory$Specification
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_112]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_112]
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_112]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_112]
    ... 31 common frames omitted

Using 1.4.5 with Brixton.SR6 is a combination that generally works well for me.

Manglu
  • 10,744
  • 12
  • 44
  • 57

6 Answers6

93

Updated in August 2023

Spring Cloud release train Spring Boot compatibility

Compatibility Matrix
Spring Cloud Spring Boot
2022.0.3+ aka Kilburn 3.0.x, 3.1.x ✱
2022.0.x aka Kilburn 3.0.x
2021.0.3+ aka Jubilee 2.6.x, 2.7.x
2021.0.x aka Jubilee 2.6.x
2020.0.3+ aka Ilford 2.4.x, 2.5.x
2020.0.x aka Ilford 2.4.x

✱ According to the official Spring Cloud project page, Spring Cloud 2022.0.3 and 2022.0.4 should be compatible with Spring Boot 3.1.x. However, some users have reported in the comments that these releases are still only compatible with 3.0.x, and not with 3.1.x.

⚠ Below Spring Cloud versions have all reached end of life status and are no longer supported.
Spring Cloud Spring Boot
Hoxton.SR5+ 2.2.x, 2.3.x
Hoxton 2.2.x
Greenwich 2.1.x
Finchley 2.0.x
Edgware 1.5.x
Dalston 1.5.x
Camden.SR5+ 1.4.x, 1.5.x
Camden 1.4.x
Brixton 1.3.x, 1.4.x
Angel 1.2.x
⚠ Below are milestones of Spring Cloud (preview).
Spring Cloud Spring Boot
2023.0.0-M1 3.2.0-M1
2022.0.0-M4 3.0.0-M4
2022.0.0-M3 3.0.0-M3
2022.0.0-M2 3.0.0-M2
2022.0.0-M1 3.0.0-M1
2021.0.0-M2 2.6.0-M3

Sources:

  1. Spring Cloud project page
  2. Spring Cloud 2021.0.0-M2 (codename Jubilee) is Available
  3. Spring Cloud 2021.0.0 (codename Jubilee) Has Been Released
  4. Spring Cloud Roadmap and EOL Announcements
  5. 2022.0.0-M1 PRE reference doc
  6. Spring Cloud 2022.0.0-M2 (codename Kilburn) Has Been Released
  7. Spring Cloud 2022.0.0-M3 (codename Kilburn) Has Been Released
  8. Spring Cloud 2023.0.0-M1 (aka Leyton) has been released
  9. Spring Cloud 2022.0.3 (aka Kilburn) Is Available comments
  10. Spring Cloud 2022.0.4 (aka Kilburn) Is Available comments
naXa stands with Ukraine
  • 35,493
  • 19
  • 190
  • 259
46

Here is the release train Spring Boot compatibility table. Below the table, there is a note that the Camden release train builds on Spring Boot 1.4.x, but is also tested with 1.5.x.

You can also read the release notes for each release which notes compatible component versions:

Spring Cloud Camden builds on Spring Boot 1.4.x.

But later:

Adds Boot 1.5 compatibility and breaks Boot 1.3 compatibility

ordonezalex
  • 2,645
  • 1
  • 20
  • 33
Strelok
  • 50,229
  • 9
  • 102
  • 115
  • 1
    Thanks. You had stated that "Camden release train is not compatible with Spring Boot 1.5.x". The Camden Releases notes link that you had referenced states the following- Adds Boot 1.5 compatibility and breaks Boot 1.3 compatibility. The quick-starts also states the same information - The Camden release train builds on Spring Boot 1.4.x, but is also tested with 1.5.x. – Manglu Mar 08 '17 at 03:52
  • 2
    Beginning with `Camden.SR5`, the `Camden` release train will be Boot 1.5 compatible. – Ryan Baxter Mar 08 '17 at 15:55
23

Yes there is: http://start.spring.io/actuator/info

It includes more libraries than just spring-cloud, but not every single one of them.

Stefanos Kalantzis
  • 1,619
  • 15
  • 23
16

2023 and it's still quite tedious to find the latest matching versions of Spring Boot and Spring Cloud... Here a procedure:

  1. Look up the Release train Spring Boot compatibility table in https://spring.io/projects/spring-cloud, it shows the matching versions of Spring Boot and Spring Cloud. Here that table as of 2023-03-17:

    Screenshot of Spring Release trains as of 2023-08-24

  2. Klick on the link in the "Release Train" column (screenshot: on the left side) to reach the Spring Cloud release notes, where the latest "Release Train" versions are mentioned.
    E.g.: "Hoxton ==> Hoxton.SR12".

    Double-check (because sometimes the release notes are not updated):
    find the latest matching Spring Cloud Release Train version in https://github.com/spring-cloud/spring-cloud-release/tags.

  3. Pick the value from the "Boot Version" column and look up the highest matching version in the Spring Boot releases, here: https://github.com/spring-projects/spring-boot/releases or (faster) here: https://github.com/spring-projects/spring-boot/tags.
    Example continued: "==> v2.3.12.RELEASE".

Another info source is the Spring Blog category "releases": https://spring.io/blog/category/releases, but imho that is a bit ... confusing.

t0r0X
  • 4,212
  • 1
  • 38
  • 34
2

I found a way to get the exact version compatibility between spring boot and spring cloud.

Just visit this URL: https://start.spring.io/actuator/info

spring-cloud": {
"Hoxton.SR12": "Spring Boot >=2.2.0.RELEASE and <2.4.0.M1",
"2020.0.5": "Spring Boot >=2.4.0.M1 and <2.6.0-M1",
"2021.0.0-M1": "Spring Boot >=2.6.0-M1 and <2.6.0-M3",
"2021.0.0-M3": "Spring Boot >=2.6.0-M3 and <2.6.0-RC1",
"2021.0.0-RC1": "Spring Boot >=2.6.0-RC1 and <2.6.1",
"2021.0.1": "Spring Boot >=2.6.1 and <2.6.5-SNAPSHOT",
"2021.0.2-SNAPSHOT": "Spring Boot >=2.6.5-SNAPSHOT and <3.0.0-M1",
"2022.0.0-M1": "Spring Boot >=3.0.0-M1 and <3.1.0-M1"
},
light
  • 113
  • 4
0

As this questions seems to be very popular and it helped me a lot when I started working with Spring Cloud & Spring Boot, I am linking the official GitHub documentation and compatiblity matrix for Spring Cloud project.

Reference: https://github.com/spring-cloud/spring-cloud-release/wiki/Supported-Versions

2023.0 (Leyton) 2022.0 (Kilburn) 2021.0 (Jubilee) 2020.0 (ilford) Hoxton Greenwich Finchley~~ Edgware
spring-boot 3.2.x 3.1.x/3.0.x 2.7.x/2.6.x 2.5.x/2.4.x 2.3.x/2.2.x 2.1.x 2.0.x 1.5.x
spring-cloud-bus 4.1.x 4.0.x 3.1.x 3.0.x 2.2.x 2.1.x 2.0.x 1.3.x
spring-cloud-circuitbreaker 3.1.x 3.0.x 2.1.x 2.0.x 1.0.x - - -
spring-cloud-cli - - 3.1.x 3.0.x 2.2.x 2.1.x 2.0.x 1.4.x
spring-cloud-cloudfoundry - - 3.1.x 3.0.x 2.2.x 2.1.x 2.0.x 1.1.x
spring-cloud-commons 4.1.x 4.0.x 3.1.x 3.0.x 2.2.x 2.1.x 2.0.x 1.3.x
spring-cloud-config 4.1.x 4.0.x 3.1.x 3.0.x 2.2.x 2.1.x 2.0.x 1.4.x
spring-cloud-consul 4.1.x 4.0.x 3.1.x 3.0.x 2.2.x 2.1.x 2.0.x 1.3.x
spring-cloud-contract 4.1.x 4.0.x 3.1.x 3.0.x 2.2.x 2.1.x 2.0.x 1.2.x
spring-cloud-function 4.1.x 4.0.x 3.2.x 3.1.x 3.0.x 2.0.x 1.0.x 1.0.x
spring-cloud-gateway 4.1.x 4.0.x 3.1.x 3.0.x 2.2.x 2.1.x 2.0.x 1.0.x
spring-cloud-kubernetes 3.1.x 3.0.x 2.1.x 2.0.x 1.1.x 1.0.x - -
spring-cloud-netflix 4.1.x 4.0.x 3.1.x 3.0.x 2.2.x 2.1.x 2.0.x 1.4.x
spring-cloud-openfeign 4.1.x 4.0.x 3.1.x 3.0.x 2.2.x 2.1.x - -
spring-cloud-security - - - - 2.2.x 2.1.x 2.0.x 1.2.x
spring-cloud-sleuth - - 3.1.x 3.0.x 2.2.x 2.1.x 2.0.x 1.3.x
spring-cloud-stream 4.1.x 4.0.x 3.2.x 3.1.x Horsham.x Fishtown.x Elmhurst.x Ditmars.x
spring-cloud-task 3.1.x 3.0.x 2.4.x 2.3.x 2.2.x 2.1.x 2.0.x 1.2.x
spring-cloud-vault 4.1.x 4.0.x 3.1.x 3.0.x 2.2.x 2.1.x 2.0.x 1.1.x
spring-cloud-zookeeper 4.1.x 4.0.x 3.1.x 3.0.x 2.2.x 2.1.x 2.0.x 1.2.x

maxi175
  • 313
  • 3
  • 7