I\'ve got a JPA @MappedSuperClass
and an @Entity
extending it:
@MappedSuperclass
public cl
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 annotation restricted type. See the referenced answers below.
See also: