Upgrading Spring Data
Spring Boot 3 uses Hibernate 6.1 by default, while Spring Boot 2 uses Hibernate 5. Therefore, we need to prepare the application to match Hibernate 6.1.
Hibernate uses Jakarta EE, and that requires upgrading the javax.*
namespaces to jakarta.*
, but we already did this step in the First step to Spring 3.0 recipe.
Some changes in Hibernate 6.1 are internal, but some APIs changed and should be upgraded in the application.
Some changes related to the configuration of Spring Data are specific to Cassandra.
In this recipe, we’ll make the necessary changes to align the sample application with Hibernate 6.1 and Cassandra.
Getting ready
We’ll use the outcome of the First step to Spring 3.0 recipe as the starting point for this recipe. You can use the version I created if you haven’t completed it yet. You can find it in the book’s GitHub repository at https://github.com/PacktPublishing/Spring-Boot-3.0-Cookbook in the chapter9...