Spring Boot [2.6.6] is not compatible with this Spring Cloud release train

Viewed 6503

We're trying to upgrade spring boot version to 2.6.6 and faced up with "Spring Boot [2.6.6] is not compatible with this Spring Cloud release train" (when running integration tests).

In additional

spring-cloud.version = 2021

We're using org.springframework.cloud (spring-cloud-starter-openfeign & spring-cloud-openfeign-cores) 3.1.1

according to the documentation , spring boot support 2.6.6 should be compatible.

2 Answers

I have multimodule project using maven.

After migrating for Spring-Boot version 2.4.2 to 2.6.6, I face multiple issues.

  • First one is the application won't be able to find the Bootstrap class. The error is:

    Caused by: java.lang.ClassNotFoundException: org.springframework.boot.Bootstrapper

To fix the issue I need to add the dependency in the pom.xml of the module:

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-bootstrap</artifactId>
    </dependency>
  • Second problem I face is to this "Spring Cloud release train"

In this case I need to upgrade the Spring-Cloud version to "2021.0.1" which is compatible with Spring-Boot 2.6.6

  • Third problem I face is this error while starting the application:

    "No spring.config.import property has been defined"

The reason for this error is that some of the "bootstrap.properties" files are deprecated in the new version so application won't starts. To fix this, we need to add below property in application.properties or application.yml file.

spring.config.import=optional:configserver:

You could try and set your spring cloud version to

spring-cloud.version = 2021.0.1

If it is not that simple mistake I am sorry. The documentation that you linked to is correct. Spring Boot [2.6.6] is compatible with spring-cloud.version 2021.x.x. openfeign 3.1.1 is also part of springCloud 2021.x.x. I have multiple project with this configuration running. In all of them the runtime as well as the integration test are working properly. Otherwise a stacktrace would be nice to gain further information :)

Related