Spring Boot version update from 1.5.x to 2.x - spring

While upgrading spring boot version form 1.5.x to 2.x, i am getting errors in MongoTemplate. In older version getCollection method returns DbCollection where new version return MongoCollection.
How to convert legacy code to new version code?
Please help me
Thanks in advance

Related

Session vs CqlSession in CassandraTemplate compatibility in Cassandra Java driver

I'm trying to migrate a SpringBoot project from spring-data-cassandra 2.1.x to 3.2.x and I encountered an issue:
In 2.1.x version CassandraTemplate is created as follows new CassandraTemplate(getCassandraSession()), where getCassandraSession() returns com.datastax.driver.core.Session.
But in 3.2.x version CassandraTemplate doesn't have such a constructor. It only supports com.datastax.oss.driver.api.core.CqlSession. Is there a way to retrieve CqlSession from Session or to make it backward compatible?
Datastax version is 3.6.0.
Thank you!
Datastax upgraded its driver in January 2019 from 3.x to 4.x with no backward compatibility. Spring Data 3.x moved the latest version of the drivers a while ago indeed.
Solution is to upgrade your code to an updated version or stay stuck with Spring Data Cassandra 2.x (and Spring Boot 1.x).
To migrate your code from 3x to 4x please follow the upgrade guide and some code to help you.

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.

Which the compatible version of spring batch with spring 3.0.x and hibernate 3.6.3?

i'm using spring version 3.0.5 and hibernate-core version 3.6.3.final, hiberanate-commons-annotations-3.2.0.final and hibernate-jpa-2.0-api-1.0.0.final.jar and i want to know which version is compatible ?
I can"t modify the versions of spring and hibernate at the moment. For technical problems hibernate4 not support HibernateTemplate and spring version great than 3.0.x not support HibernateDaoSupport too.
So I want the spring batch version that is compatible with these two versios.
Thanks.
use spring-batch-2.1.9.RELEASE it is compatible with spring-core 3.0.x.
From 2.2.0 spring-Batch needs spring-core 3.2.0

Which version of Spring Data Release Train supports Hibernate 5.2?

I'm developing a simple web app with Spring, JPA, Hibernate, all latest versions.
I've imported hibernate-core in 5.2.4.Final as well as spring-data-jpa which version is set through the Hopper-SR5 version of spring-data-releasetrain. But the spring related dependencies are still 4.2.x !!!
And I'm facing the NoSuchMethodError: org.hibernate.Session.getFlushMode() problem related to the integration of Hibernate 5.2 into Spring which will be fixed in 4.3!
Integrate Hibernate 5.2 with Spring framework 4.x
https://jira.spring.io/browse/SPR-14334
Never noticed this page:
https://github.com/spring-projects/spring-data-commons/wiki/Release-Train-Hopper
=> Core: Upgrade Spring Framework baseline to 4.2
So basically I suppose I'm not using the correct release train version (but it's the GA!)
But next release train doesn't have anything related to Spring Framework:
https://github.com/spring-projects/spring-data-commons/wiki/Release-Train-Ingalls
and the "next next" has Spring Framework 5:
https://github.com/spring-projects/spring-data-commons/wiki/Release-Train-Kay
What am I supposed to do?
upgrade release train, to which version?
keep release train to current version, but downgrade Hibernate version?
remove release train and import each spring module one by one?
Thanks.

Which version of CXF and spring to use?

I am new to both CXF and Spring.
I want to know which version of CXF and Spring to use to build webservices?
Thank You.
Use the latest version of Spring (currently 3.1) and the latest version of CXF (currently 2.5.2).

Resources