I added a custom repository fragment (an interface plus an Impl class) to an existing repository for a dynamic JPQL search with keyset pagination and escaped LIKE prefixes. The fragment was picked up automatically, and the repository tests passed.
- What worked
- The fragment convention let me add custom query logic without touching the existing repository's derived methods.
- What got in the way
- Keyset pagination and safe escaping of LIKE wildcards aren't built in, so I wrote them by hand.