On behalf of the team and everyone who has contributed, I am pleased to announce the fourth milestone for the next Spring Data generation. This milestone continues delivering new features and refinements.
Ahead-of-Time Optimization for Repositories
When applying AOT optimizations through Spring Boot’s build plugin, then AOT-generated Repositories are now enabled by default: You no longer need to set the spring.aot.repositories.enabled
property.
Additionally, you can disable AOT repository generation entirely or individually by setting either spring.aot.jpa.repositories.enabled=false
or spring.aot.mongodb.repositories.enabled=false
.
For MongoDB, we’ve added AOT repository support for additional query methods:
- Using Geospatial types for
Near
andWithin
queries - Vector Search
- Collations
- Value Expressions
Updated MongoDB BigDecimal and BigInteger Representation Defaults
Spring Data MongoDB has updated its default using Decimal128
for BigDecimal
and BigInteger
values (querying and writing).
Existing values can be read by Spring Data MongoDB 5.0, but queries and writes will use Decimal128
. Make sure to migrate either your data to Decimal128
or switch back the default or individual properties to use the String-based representation.
Composite Identifiers in Spring Data JDBC
Spring Data JDBC ships with Composite Id support. Composite identifiers can now be complex types, ideally a type with a set of simple properties. A simple example would look like:
class Person {
@Id Name id;
String nickname;
Integer age;
}
record Name(String first, String last) {
}
While it is not necessary (complex @Id
types are considered embeddables) for simple arrangements, you can use @Embedded(prefix=…)
to configure column name prefixes.
Spring Data Redis
Spring Data Redis is now annotated using JSpecify annotations. Command and Operations interfaces are deliberately @NullUnmarked
as Redis’ Transactional behavior renders each method conditionally nullable based on whether it is used in the context of transactions or pipelining. We consider this to be the best compromise between nullness indication and the trouble that stems from working around nullness indication that isn’t applicable in a certain context.
We also ship with Jackson 3-based serializers along with the existing Jackson 2 support that is now deprecated.
Going forward, we’re working on finalizing Jackson 3 support in the upcoming months. Refer to our detailed release notes for a complete list of changes.
Thanks to all those who have contributed with issue reports and pull requests.
2025.1.0-M4
- Spring Data Commons
4.0 M4
– Javadoc – Documentation – Changelog - Spring Data JPA
4.0 M4
– Javadoc – Documentation – Changelog - Spring Data MongoDB
5.0 M4
– Javadoc – Documentation – Changelog - Spring Data KeyValue
4.0 M4
– Javadoc – Documentation – Changelog - Spring Data for Apache Cassandra
5.0 M4
– Javadoc – Documentation – Changelog - Spring Data Neo4j
8.0 M4
– Javadoc – Documentation – Changelog - Spring Data LDAP
4.0 M4
– Javadoc – Documentation – Changelog - Spring Data REST
5.0 M4
– Javadoc – Documentation – Changelog - Spring Data Redis
4.0 M4
– Javadoc – Documentation – Changelog - Spring Data Elasticsearch
6.0 M4
– Javadoc – Documentation – Changelog - Spring Data Couchbase
6.0 M4
– Javadoc – Documentation – Changelog - Spring Data Relational
4.0 M4
– Javadoc – Documentation – Changelog
暂无评论内容