Spring Data 2026.0.0-M1 introduces type-safe property paths as an alternative to string-based property references in queries. String-based references lack compiler validation and IDE refactoring support, causing bugs that only surface at runtime. The new approach uses Java method references (e.g., TypedPropertyPath.of(Person::getFirstName)) and Kotlin property references with operator overloads, providing compile-time validation, IDE navigation, and refactoring safety. Existing string-based APIs remain fully supported; type-safe paths are strictly additive and can be adopted incrementally. Method references are introspected once and cached for performance.
Table of contents
String-based property references in practiceMetamodel-based approachesBuild infrastructure considerationsType-safe property referencesKotlin supportMigration pathLooking forward1 Comment
Sort: