I'm trying to implement a custom Spring repository. I have the interface:
public interface FilterRepositoryCustom {
List<User> filterBy(String role);
}
the implementation:
public class FilterRepositoryImpl implements FilterRepositoryCustom {
...
}
and the "main" repository, extending my custom repository:
public interface UserRepository extends JpaRepository<User, String>, FilterRepositoryCustom {
...
}
I'm using Spring Boot and, according to the docs:
By default, Spring Boot will enable JPA repository support and look in the package (and its subpackages) where @SpringBootApplication is located.
When I run my application, I get this error:
org.springframework.data.mapping.PropertyReferenceException: No property filterBy found for type User!