Moving beyond Strings in Spring Data
If you've worked with data access in Java and especially with Spring Data for a while, then you are familiar with various Query and Update programming models. You write data access code. You refactor a property name. You run your tests. They fail. Your query strings? Still pointing to the old property name because strings don't refactor.
Sort.by("firstName", "lastName");
where("address.country").is(…);
Query construction often involves referencing domain properties by strings, whether for predicates, sorting, or path navigation. This approach is simple and intentionally lightweight. It…