-
Notifications
You must be signed in to change notification settings - Fork 699
Release Train 2022.0 (Turing) Release Notes (Preview)
-
Upgrade to Java 17 baseline
-
Upgrade to Spring Framework 6
-
Upgrade to Jakarta EE 9
-
Refine repository interface arrangement
-
Merge of Spring Data Envers into Spring Data JPA repository
-
Merge of Spring Data R2DBC into Spring Data Relational repository
Details
-
Spring Data Build - 3.0
Spring Data now requires Java 17 as baseline. All code is being compiled using Java 17 bytecode.
Spring Data now compiles against Jakarta EE 9 and the jakarta. packages instead of javax. (e.g. jakarta.persistence instead of javax.persistence).
Spring Data offers new variants of the CRUD repositories. These return a List for methods that return multiple entities:
-
ListCrudRepository -
ListQuerydslPredicateExecutor -
ListQueryByExampleExecutor
They can be used as a drop in replacement for the interfaces of same name but without the List prefix.
Sorting repositories no longer extend their respective CRUD repository. If one requires the old behaviour one must extend not only the sorting repository, but also the respective CRUD repository explicitly. This was done so the sorting support can easily be combined with the List repositories introduced above.
The affected interfaces are:
-
PagingAndSortingRepositoryno longer extendsCrudRepository -
ReactiveSortingRepositoryno longer extendsReactiveCrudRepository -
CoroutineSortingRepositoryno longer extendsCoroutineCrudRepository -
RxJavaSortingRepositoryno longer extendsRxJavaCrudRepository
Joda Time and ThreeTenBackport are no longer supported for temporal type conversions and general operations such as auditing. Please use Java’s built-in JSR-310 time types from the java.time package.
RxJava 1 and 2 types are no longer supported when declaring reactive repository declarations. Please use either Project Reactor of RxJava 3 instead.
API that was removed:
-
EntityInstantiatorin theo.s.d.convertpackage. Use the entity instantiators in theo.s.d.mapping.modelas replacement. -
PageableExecutionUtilsin theo.s.d.repository.supportpackage. The utility was moved into theo.s.d.supportpackage. -
Removal (or encapsulation) of various deprecated methods or constructors, such as
Lazyconstructor, methods onReactiveWrappersand others.
When you use an ignoreCase operator, whether that’s with standard finders, JSqlParser, Querydsl, or Query by Example, all will lower the selected column, so you only need to maintain one index. If you currently have an index built for upper, you can either remove it or replace it with a proper one.
With the introduction of BeforeConvertCallback and BeforeConvertEvent those should have been used for Id generation for new aggregates which don’t get an id from the database. By accident it was still possible to use BeforeSaveCallback or the respective event for this purpose. We from now on only support BeforeConvertCallback and BeforeConvertEvent for this purpose.
Methods on the MongoTemplate API allowing streaming-oriented result consumption for find and aggregate operations now return a Java 8 Stream to simplify result consumption as a stream. Previously, these methods returned CloseableIterator. Note that the returned Stream must be closed so consumption with try-with-resources can be used in these cases:
try (Stream<Person> stream = mongoTemplate.stream(query, Person.class)) {
// consume stream
}-
M1 - Jan 14, 2022
-
M2/M3 - Mar 18, 2022
-
M4 - May 13, 2022
-
M5 - Jul 14, 2022
-
M6 - Sept 16, 2022
-
RC1 - Oct 14, 2022
-
GA - Nov 18, 2022
-
OSS Support until: tbd
-
End of Life: tbd.