Hibernate version compatibility with Spring 5.3.22 - spring

I would like to find out what is the compatible version of hibernate core and validator for spring version 5.3.22. I tried to search for the spring-orm 5.3.22 pom xml file in the .m2\repository\org\springframework\spring-orm, but it did not show any information related hibernate. I have tried using 5.3.22.RELEASE, but the result stays the same. Are there any approach that I can use to determine the compatible version? Thank you in advance.

Related

How do I find out if a component is compatible with the current version of Spring

For a given spring version how do I find out which if the latest version of a component is supported or not,For example-if we are using spring boot (v1.5.8.RELEASE) ,how do I know if that spring version supports the latest version of a component say netty-all (4.1.63.Final) or the spring boot version does not support it and needs a spring version upgrade
I guess you put the version into your POM and run your tests. Then you'll see.

Hibernate-Validator 6.0.3Final compatible spring version

We are using hibernate validator version 5.1.3.Final with spring version 4.1.6.RELEASE to validate the input data along with bean-io framework.
Now we are planning to upgrade the hibernate validator to latest version to improve the performance of the workflow.
Kindly provide the compatible version of spring framework version with latest hibernate validator.
Thanks,
Chethan
Hibernate Validator 6.0.x should be compatible with the version of Spring you are using and any further versions.
Just be careful about the dependencies as the groupId for Hibernate Validator has changed from org.hibernate:hibernate-validator to org.hibernate.validator:hibernate-validator. So be sure you don't have both dependencies in your classpath.
And be careful to use validation-api 2.0.0.Final with it. It's an explicit dependency so it shouldn't be an issue but you might have overridden it somewhere.

Spring Boot and Spring Data Jpa versions compatiblity

I am using the latest (by the time of writing) Spring-Boot-starter-data-jpa (version 1.2.6.RELEASE). I find it actually uses the Spring-data-jpa version 1.7.3.RELEASE, which is considerably behind the latest (1.9).
Is it a supported approach to upgrade individual dependencies such as the Spring-data-jpa? If I do this myself, for example, by declaring a direct dependency on the wanted newer version (may just override the version properties), any side effect you guys foresee?
The reason why I am doing this is that I need to use a special parameter in this annotation:#EnableJpaRepositories(repositoryBaseClass = JpaRepositoryWithI18n.class)
That is not available in the supplied 1.7.3 jpa library.
Any workaround would be appreciated too.
Thanks
EDIT:
I tested the following two ways: 1) declared a direct dependency to Spring-JPA-data 1.9.0 and excluded it from spring-boot-starter-data-jpa 2) upgrade Spring-boot-web-starter to 1.3.0m5
2) worked out well for me. This is also what dunni's answer suggested.
I have not tested Andi's answer as this is a new project, we could easily upgrade the entire spring boot and regression test it without worrying too much about side-effects.
But I can see Andi's answer is an easier approach than 1). More importantly, it shows how you can upgrade other dependencies independently -- just overide the versions in parent pom.
Thanks
Spring Data JPA 1.9 is part of the Spring Data Gosling release train. As described in the Gosling announcement you can use it with Spring Boot 1.2:
To upgrade to the new release train use the BOM we ship as described in our examples repository and configure its version to Gosling-RELEASE. If you’re using Spring Boot, upgrading to the release train is as easy as setting the Maven property spring-data-releasetrain.version to that version. Note, that to use Spring Data REST with Boot 1.2, you also need to upgrade to Spring HATEOAS 0.19.0.RELEASE (by setting the spring-hateoas.version property) and Jackson 2.5 or better (current 2.6.1 preferred, via the jackson.version property).
In short, add this to your pom:
<properties>
<spring-data-releasetrain.version>Gosling-RELEASE</spring-data-releasetrain.version>
</properties>
It's not supported in that matter, that the Spring Boot test cases don't include newer versions. So your application might work with the newer version, but there may be some errors. With minor releases it's more likely to work without problems than with major version upgrades. You can also upgrade Spring Boot to 1.3.0.M5 (you should note however, that this is a milestone version, not yet the release).

struts 2 spring plugin - spring version

When using the spring plugin for struts 2, is it possible to use the latest version of spring or are you stuck with the version referenced in the plugin? For example in my project I am using struts 2.3.16.3 and its spring plugin automatically uses spring 3.0.5 . So if I add spring 4.1 to my pom as a dependency then there are multiple versions of spring added to the classpath.
You shouldn't have more than one Spring library in your classpath - disaster will be bound to happen. I guess you can either exclude the spring dependency in that plugin or set its version to the one you want.
The main problem with this approach is moving between major versions (3.x to 4.x) - if Spring is respecting Semantic Versioning incompatibilities will exist between the two versions and it is possible (or likely) that struts2-spring-plugin is using something that changed.
Edit: Comment below reports successful usage of struts2-spring-plugin and Spring4.

Spring framework version with Spring Data Neo4j

Is there a version matrix for Spring framework core with Spring Data Neo4j?
I am looking for the (least) version of Spring framework core that is compatible (should be used) with Spring Data Neo4j 2.0.0.
If you use maven, and add just spring-data-neo4j, it will fetch all dependencies automatically. Even if you don't use maven, you can check the declared dependencies. From what I see in the pom file, it doesn't declare a specific version, which means it should be compatible with the latest version.

Resources