Search code examples
spring-bootgoogle-cloud-platformgoogle-cloud-spanner

How to check which Spring Boot version goes with spring-cloud-gcp-starter-data-spanner 1.1.0.RC1?


I intended to use Spring Data Cloud Spanner starter (version 1.1.0.RC1) with Spring Boot application but cannot find the official document of which Spring Boot version it goes with. Running my app and it works well with Spring Boot 2.x.x but not with Spring Boot version 1.x.x (ClassNotFoundException). Could anyone help:

  1. Any document to show which SpringBoot version goes with Spring Data Cloud Spanner starter (version 1.1.0.RC1)?
  2. Any way to make Data Cloud Spanner starter (ideally 1.1.0.RC1) work with SpringBoot version 1.5.17?

Thank you.


Solution

  • TL;DR Spring Boot 2.1 but you shouldn't have to care.

    Spring Cloud Data Spanner is part of the Spring Cloud GCP project that recently joined the official Spring Cloud release train.

    Rather than figuring out which version of a particular library is needed , I'd strongly recommend you to use proper dependency management in your build and let default apply. That way you can select a Spring Cloud generation (i.e. release train) and the dependencies that you need will be managed for you automatically (that is, no need to provide a version for them).

    The latest 1.0 RC, RC2 at the time of writing, is part of the Greenwich release train with a RC2 release this week.

    To get started with proper dependency management, go to https://start.spring.io and select "GCP Support" to get a build with the proper BOM import. Once you've done that you can add the starter without a version and things will be managed for you.

    The relationships between Spring Boot version and Spring Cloud release train is documented here and on start.spring.io as well.