How to implement a Spring Data repository for a @MappedSuperclass
It’s just a matter of annotating the abstract Repository as @NoRepositoryBean: @NoRepositoryBean public interface Dao<T extends BaseClass, E extends Serializable> extends CrudRepository<T, E> { Iterable<T> findByActive(Boolean active); } This way Spring relies on the underlying repository implementation to execute the findByActive method. Regarding to the annotation type restriction issue, it’s not possible to declare an … Read more