You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spring Data now requires Java 17 as a baseline. All code is being compiled using Java 17 bytecode.
Upgrade Jakarta baseline to Jakarta EE 9.
Spring Data now compiles against Jakarta EE 9 and the jakarta. packages instead of javax. (e.g. jakarta.persistence instead of javax.persistence).
New CRUD repository interfaces that return List instead of Iterable
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 inherit from CRUD repositories.
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:
PagingAndSortingRepository no longer extends CrudRepository
ReactiveSortingRepository no longer extends ReactiveCrudRepository
CoroutineSortingRepository no longer extends CoroutineCrudRepository
RxJavaSortingRepository no longer extends RxJavaCrudRepository
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.
Removal of RxJava 1 and 2 support
RxJava 1 and 2 types are no longer supported when declaring reactive repository declarations. Please use either Project Reactor of RxJava 3 instead.
Removal of deprecated public API
API that was removed:
EntityInstantiator in the o.s.d.convert package. Use the entity instantiators in the o.s.d.mapping.model as replacement.
PageableExecutionUtils in the o.s.d.repository.support package. The utility was moved into the o.s.d.support package.
Removal (or encapsulation) of various deprecated methods or constructors, such as Lazy constructor, methods on ReactiveWrappers and others.
Spring Data JPA - 3.0
ignoreCase operators now use lower() functions across the board
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.
Spring Data Relational - 3.0
Spring Data JDBC
Query By Example Support
Spring Data JDBC now supports Query By Example.
Events and Callbacks
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.
Mybatis integration
Since at the time of the M4 release only snapshot releases of mybatis-spring 2.1 are available we decided to downgrade to 2.0.7. for the M4 release. Unfortunately that release is not compatible with the current milestone of Spring Framework and therefore the MyBatis integration is broken. If you want to use MyBatis with this release, manually add a dependency to mybatis-spring 2.1.0-SNAPSHOT.
Spring Data R2DBC
Upgrade to R2DBC 1.0
Spring Data R2DBC has upgraded to R2DBC 1.0.0.RELEASE and is compatible with R2DBC 1.0 drivers only. Due to API incompatibilities, R2DBC 0.8 and 0.9 drivers cannot be used. Driver usage requires an upgraded driver that complies with R2DBC 1.0.
Spring Data MongoDB - 4.0
Revise MongoTemplate Stream API
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:
The CassandraMappingContext bean is now renamed to cassandraMappingContext from previously cassandraMapping for a consistent naming scheme across all Spring Data modules. This change is also reflected when using the XML Namespace configuration.
Spring Data for Apache Geode - 3.0
Spring Data Redis - 3.0
Spring Data KeyValue - 3.0
Spring Data REST - 4.0
Spring Data LDAP - 3.0
The text was updated successfully, but these errors were encountered:
labels: ["3.0.0","epic","upgrade:spring-data"]
https://github.com/spring-projects/spring-data-commons/wiki/Spring-Data-2022.0-(Turing)-Release-Notes-(Preview)
General Themes
Upgrade to Java 17 baseline
Upgrade to Spring Framework 6
Upgrade to Jakarta EE 9
Ship Ahead-of-Time processing and reflection hints for Graal Native Image compilation
Refine repository interface arrangement
Merge of Spring Data Envers into Spring Data JPA repository
Merge of Spring Data R2DBC into Spring Data Relational repository
Participating Modules
Details
Spring Data Build - 3.0
Spring Data Commons - 3.0
Spring Data JPA - 3.0
Spring Data Relational - 3.0
Spring Data MongoDB - 4.0
Spring Data Neo4j - 7.0
Spring Data Elasticsearch - 5.0
Spring Data Couchbase - 5.0
Spring Data for Apache Cassandra - 4.0
Spring Data for Apache Geode - 3.0
Spring Data Redis - 3.0
Spring Data REST - 4.0
Spring Data KeyValue - 3.0
Spring Data LDAP - 3.0
New and Noteworthy
Spring Data Commons - 3.0
Upgrade Java baseline to Java 17
Spring Data now requires Java 17 as a baseline. All code is being compiled using Java 17 bytecode.
Upgrade Jakarta baseline to Jakarta EE 9.
Spring Data now compiles against Jakarta EE 9 and the
jakarta.
packages instead ofjavax.
(e.g.jakarta.persistence
instead ofjavax.persistence
).New CRUD repository interfaces that return List instead of Iterable
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 inherit from CRUD repositories.
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:
PagingAndSortingRepository
no longer extendsCrudRepository
ReactiveSortingRepository
no longer extendsReactiveCrudRepository
CoroutineSortingRepository
no longer extendsCoroutineCrudRepository
RxJavaSortingRepository
no longer extendsRxJavaCrudRepository
3.0.0-M3
PagingAndSortingRepository
does not extendCrudRepository
anymore #2363.0.0-M3 Sorting repositories no longer inherit from CRUD repositories. #257
Removal of Joda Time and ThreeTenBackport support
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.Removal of RxJava 1 and 2 support
RxJava 1 and 2 types are no longer supported when declaring reactive repository declarations. Please use either Project Reactor of RxJava 3 instead.
Removal of deprecated public API
API that was removed:
EntityInstantiator
in theo.s.d.convert
package. Use the entity instantiators in theo.s.d.mapping.model
as replacement.PageableExecutionUtils
in theo.s.d.repository.support
package. The utility was moved into theo.s.d.support
package.Removal (or encapsulation) of various deprecated methods or constructors, such as
Lazy
constructor, methods onReactiveWrappers
and others.Spring Data JPA - 3.0
ignoreCase operators now use
lower()
functions across the boardWhen you use an
ignoreCase
operator, whether that?s with standard finders, JSqlParser, Querydsl, or Query by Example, all willlower
the selected column, so you only need to maintain one index. If you currently have an index built forupper
, you can either remove it or replace it with a proper one.Spring Data Relational - 3.0
Spring Data JDBC
Query By Example Support
Spring Data JDBC now supports Query By Example.
Events and Callbacks
With the introduction of
BeforeConvertCallback
andBeforeConvertEvent
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 useBeforeSaveCallback
or the respective event for this purpose. We from now on only supportBeforeConvertCallback
andBeforeConvertEvent
for this purpose.Mybatis integration
Since at the time of the M4 release only snapshot releases of mybatis-spring 2.1 are available we decided to downgrade to 2.0.7. for the M4 release. Unfortunately that release is not compatible with the current milestone of Spring Framework and therefore the MyBatis integration is broken. If you want to use MyBatis with this release, manually add a dependency to mybatis-spring 2.1.0-SNAPSHOT.
Spring Data R2DBC
Upgrade to R2DBC 1.0
Spring Data R2DBC has upgraded to R2DBC
1.0.0.RELEASE
and is compatible with R2DBC 1.0 drivers only. Due to API incompatibilities, R2DBC 0.8 and 0.9 drivers cannot be used. Driver usage requires an upgraded driver that complies with R2DBC 1.0.Spring Data MongoDB - 4.0
Revise
MongoTemplate
Stream APIMethods on the
MongoTemplate
API allowing streaming-oriented result consumption forfind
andaggregate
operations now return a Java 8Stream
to simplify result consumption as a stream. Previously, these methods returnedCloseableIterator
. Note that the returnedStream
must be closed so consumption withtry-with-resources
can be used in these cases:try (Stream<Person> stream = mongoTemplate.stream(query, Person.class)) {
// consume stream
}
Spring Data Neo4j - 7.0
Impersonation
Spring Data Elasticsearch - 5.0
Spring Data Couchbase - 5.0
Spring Data for Apache Cassandra - 4.0
Rename
CassandraMappingContext
bean nameThe
CassandraMappingContext
bean is now renamed tocassandraMappingContext
from previouslycassandraMapping
for a consistent naming scheme across all Spring Data modules. This change is also reflected when using the XML Namespace configuration.Spring Data for Apache Geode - 3.0
Spring Data Redis - 3.0
Spring Data KeyValue - 3.0
Spring Data REST - 4.0
Spring Data LDAP - 3.0
The text was updated successfully, but these errors were encountered: