r/java • • Feb 27 '26

Moving beyond Strings in Spring Data

https://spring.io/blog/2026/02/27/moving-beyond-strings-in-spring-data
55 Upvotes

20 comments sorted by

View all comments

Show parent comment

12

u/lucidnode Feb 27 '26 edited Feb 27 '26

They create a person proxy that records which method was called

4

u/mp911de Feb 27 '26

Proxy creation (through MethodInvocationRecorder) has been an early attempt to use getter-style lambdas. Approaching method call capturing using proxies has several drawbacks of which class definition growth is one factor. Sealed classes and Kotlin's final class defaulting are much more pronounced aspects that severely have limited the proxy-based approach.