Can GraphQL server be built with Spring Boot version less than 2.x? - spring-boot

I am adding GraphQL schema wiring to my legacy microservices. I want to embed the wiring inside each of the spring boot services; The challenge I am running into is my project's Spring boot version is 1.4.5 RELEASE and moving it up to 2.x runs into others issues and would be ideal if I can get a basic graphql schema wiring done without updating version to 2.x. I see from documentation that minimal Spring boot version needed is 2.2.x in articles like this:
https://www.graphql-java.com/tutorials/getting-started-with-spring-boot/

According to the gradle build file for the graphql-java-spring library (https://github.com/graphql-java/graphql-java-spring/blob/master/build.gradle) the oldest supported Spring versions are:
springVersion = "5.1.2.RELEASE"
springBootVersion = "2.1.0.RELEASE"
You can try to compile it with an earlier spring boot version, but there is probably a lot of work to do.

Related

Is spring-data-rest-webmvc:3.4.x compatible with Spring Boot 2.3.x?

There is a vulnerability (https://nvd.nist.gov/vuln/detail/CVE-2021-22047) discovered in spring-data-rest-webmvc which is only fixed in versions 3.4.14 and 3.5.6. Spring Boot 2.3.12 uses the version 3.3.9. Migrating to spring boot 2.4.x or above is not an option for us.
We would like to use spring-data-rest-webmvc:3.4.14, but we are not sure if it's compatible with spring boot 2.3.x.
Can we use them together?
Spring Data Rest version 3.4 and up use Spring Framework version 5.3.x.
Spring Boot 2.3 is build with Spring Framework 5.2.x.
Will it work, probably, but there are no garanties that it will keep working or work at all. Most like it will fail with some NoSuchMethodError or ClassNotFOundExceptions or other exotic expetions one gets when mixing modules/jars from different versions of a framework.

Spring-Boot 1.5.10.release compatibility with apache-kafka-2.3.0 client

My project is built with Spring boot 1.5.10.release. We want to migrate to Apache Kafka® 2.3.0 from Apache Kafka 1.0.x.
We are currently using Spring-kafka 1.3.9.release and want to migrate to spring-kafka-2.3.0. Can we do this without changing the Spring boot version of 1.5.10.release?
I went through the Compatibility matrix but I don't see any relevant answer to my question
https://spring.io/projects/spring-kafka
No, you can't do that. Spring Kafka 2.x, as well Spring Boot 2.x, is based on Spring Framework 5.x and Java 8. You can't mix so critical versions in Spring Boot 1.5.x.
It is really better to rely on the Spring Boot dependencies management. That way you can be sure that all the artifacts brought by Spring Boot are tested together.

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:
Any document to show which SpringBoot version goes with Spring Data Cloud Spanner starter (version 1.1.0.RC1)?
Any way to make Data Cloud Spanner starter (ideally 1.1.0.RC1) work with SpringBoot version 1.5.17?
Thank you.
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.

spring integration data-redis and data-jpa version compare my project data-redis and data-jpa version

In a project developed with Spring boot 1.5.7, data-redis and data-jpa was used. Data-jpa version is 1.11.7, data-redis version is 1.8.7. I need to add spring-integration to the project. I will use version 4.3.12. data-jpa version in this version is 1.10.10, data-redis version is 1.7.10.
It is not the same as the data-redis and data-jpa versions used in the project.
What problems can this cause ?
That can't cause any problem as far as you don't override any dependencies provided by Spring Boot. You really should just rely on the well-tested composition of dependencies represented in Spring Boot. Even if Spring Integration 4.3.12 brings Spring Data JPA 1.10.10 as a transitive dependency that doesn't mean that it is not overridden by Spring Boot.
I'm not sure which do to point you out, but one of the main goals in Spring Boot is to bring into the target project consistency and cross-compatibility in the dependencies part.
This might help you a bit: https://docs.spring.io/spring-boot/docs/2.0.3.RELEASE/reference/htmlsingle/#using-boot-dependency-management

Get errors when using certain versions of spring boot cloud and spring boot. How can I know which versions go together?

Is there something in Maven that will tell me that if I'm using version 1.5.4 of spring-boot then I need at least version Camden.SRX for spring-cloud-starter-parent?
I was getting non-helpful errors that a class was not found as I was using Spring 1.5.4 and Brixton for cloud.
Is there a way to use Maven to find matching/compatible versions?

Resources