Skip to content

Spring Data 2026.0 Release Notes

Mark Paluch edited this page Mar 12, 2026 · 8 revisions

Upgrading from Spring Data 2025.1 (Spring Data 4.0.x)

New and Noteworthy

Spring Data Commons - 4.1

Type-safe Property Paths

We now support type-safe property paths and property references to remove the need for stringly-typed programming when referring to properties within an entity.

Java variants:

PropertyPath.from("name", Person.class) // existing String-based API
PropertyPath.of(Person::getName) // type-safe property reference expression

PropertyPath.from("address.country", Person.class) // existing nested path API
PropertyPath.of(Person::getAddress).then(Address::getCountry) // type-safe composed path expression


PropertyReference.of(Secret::getSecret)

Kotlin variants:

PropertyReference.of(Secret::secret)

PropertyPath.of(Person::address / Address::city)

allowing type-safe usage through e.g.:

Sort.by(Person::getFirstName, Person::getLastName)

@ProjectedPayload opt-in required for projections

In our efforts to refine @ProjectedPayload experience, we now require projection parameter types to be annotated with @ProjectedPayload. To ease migration we log any occurence of a non-annotated projection type to provide guidance about types that must be annotated to ensure proper projection functionality. We plan to remove logging for the 2026.1 (November 2026) release train to conclude our phase out supporting not recommended annotation usage.

@ProjectedPayload
interface AnnotatedInterface { … }

interface ThirdPartyInterface { … }

@Controller
class Controller {

  @PostMapping(…)
  void supportsAnnotatedType(AnnotatedInterface param) {
    // …
  }

  @PostMapping(…)
  void supportsThirdPartyTypes(@ProjectedPayload ThirdPartyInterface param) {
    // …
  }

  @PostMapping(…)
  void unsupportedUsage(ThirdPartyInterface param) {
    // …
  }
}

Spring Data JPA - 4.1

Spring Data Relational - 4.1

Spring Data JDBC - 4.1

Spring Data R2DBC - 4.1

Spring Data MongoDB - 5.1

Multi Collection Bulk Write API

MongoOperations.bulkWrite(…​) can be used to issue a single request with mixed insert, update, and delete operations across multiple collections (requires MongoDB 8.0+) or just a single collection. In the latter case the new bulkWrite method can also be used with older MongoDB server versions.

Bulk bulk = Bulk.create(builder -> builder.inCollection(Jedi.class, spec -> spec
        .insert(new Jedi("Luke", "Skywalker"))
        .insert(new Jedi("Leia", "Princess"))
        .updateOne(where("firstname").is("Leia"), new Update().set("lastname", "Organa")))
    .inCollection(Sith.class, spec -> spec.upsert(where("name").is("Darth Sidious"), Update.update("realName", "Palpatine")))
);

BulkWriteResult result = operations.bulkWrite(bulk, BulkWriteOptions.ordered());

Spring Data Neo4j - 8.1

Spring Data Elasticsearch - 6.1

Spring Data Couchbase - 6.1

Spring Data for Apache Cassandra - 5.1

Spring Data Redis - 4.1

Annotation-driven Pub/Sub Listener Endpoints

Spring Data Redis now supports annotation-driven Pub/Sub Listener Endpoints built on Spring Messaging. Annotation-driven endpoints are called once a Pub/Sub message is received by a channel or pattern subscription through RedisMessageListenerContainer.

You can activate annotation-driven listener endpoints through @EnableRedisListeners on a configuration class such as shown below:

@Configuration
@EnableRedisListeners
public class RedisConfiguration {

  @Bean
  public RedisMessageListenerContainer redisMessageListenerContainer(RedisConnectionFactory connectionFactory) {

    RedisMessageListenerContainer factory = new RedisMessageListenerContainer();
    factory.setConnectionFactory(connectionFactory);
    return factory;
  }
}

@Component
public class MyService {

  @RedisListener(topic = "my-channel")
  public void processOrder(String data) { ... }
}

Annotated endpoints can make use of various message converters by specifying a MIME type through @RedisListener(consumes). While Pub/Sub messages themselves do not feature headers, a @RedisListener(consumes) declaration indicates a desired media type.

CAS Operations for SET and DEL

We now support value-based conditions for SET and DEL enabling compareAndSet(…) and compareAndDelete(…) functionality. With growing command complexity we do not want to introduce additional overloads, instead we provide functional command configuration for set and delete:

valueOps.set(key, newValue, spec -> spec.ifEquals().value(expectedValue).expire(Duration.ofSeconds(10)));

valueOps.set(key, newValue, spec -> spec.ifEquals().digest(expectedHex16Digest).expiration(Expiration.keepTtl()));

redisTemplate.delete(key, it -> it.ifNotEquals().value(value));

Spring Data KeyValue - 4.1

Spring Data REST - 5.1

Spring Data LDAP - 4.1

Release Dates

  • M1 - 13 February 2026

  • M2 - 13 March 2026

  • RC1 - 17 April 2026

  • GA - 15 May 2026

  • OSS Support until: June 2027

  • End of Life: June 2028

Clone this wiki locally