Search code examples
springspring-bootspring-cloud

Dependency table for spring boot 2.4.3


I have a difficulty defining what dependencies versions are compatible with each other.

In my case i have this

enter image description here

I don't know for the spring boot 2.4.3 what versions of the dependencies below go with it or the cloud version to 2020.0.1.

How can i fix this for example i want to migrate the spring boot and spring cloud to its latest versions.


Solution

  • It is a good rule of thumb to not define the versions yourself but use BOMs and let them define the versions for you:

    In order to find out which BOMs to use, you can use this compatibility matrix or the endpoint that @spencergibb mentioned: https://start.spring.io/actuator/info.

    If you want to use a Spring Project that is not in the BOM, most probably that Spring Project is not supported (e.g.: Netflix libraries by latest Spring Cloud as @spencergibb mentioned).

    Update: here's a Gradle example but you can generate a whole project using Spring Initializer:

    plugins {
      id 'org.springframework.boot' version '2.4.3'
      id 'io.spring.dependency-management' version '1.0.11.RELEASE'
      id 'java'
    }
    
    repositories {
      mavenCentral()
    }
    dependencyManagement {
      imports {
        mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2020.0.1'
      }
    }
    dependencies {
      implementation 'org.springframework.boot:spring-boot-starter-web'
      implementation 'org.springframework.cloud:spring-cloud-starter-circuitbreaker-resilience4j'
    }