How to expose a custom endpoint in SpringDataRest using a default method in Repository?
@Repository @RepositoryRestResource(collectionResourceRel = “myEntity”, path = “myEntity”) public interface MyEntity Repository extends JpaRepository<MyEntity, Long>, JpaSpecificationExecutor<MyEntity> { default Page<MyEntity > findByFilters(Map<String, String> filters, Pageable pageable){ // this is a helper class that handles filtering Specification<MyEntity > spec = new GenericSpecification<>(filters, MyEntity .class); return findAll(spec, pageable); } MyEntity findByName(String name); } I’m using SpringDataRest to generate boilerplate […]