Spring JPA Repository dynamic query [duplicate]
Per JB Nizet and the spring-data documentation, you should use a custom interface + repository implementation. Create an interface with the method: public interface MyEntityRepositoryCustom { List<User> findByFilterText(Set<String> words); } Create an implementation: @Repository public class MyEntityRepositoryImpl implements MyEntityRepositoryCustom { @PersistenceContext private EntityManager entityManager; public List<User> findByFilterText(Set<String> words) { // implementation below } } Extend … Read more