I have a JPARepository that implements another interface. The idea being that alternative implementations of the same interface could be applied. It's a conversation starter with students.
e.g.
public interface CharityRepositoryJPA extends JpaRepository<Charity, Long> , CharityRepository
I then have a service class that depends on CharityRepository. The Spring extension picks up the JPA repository as a component, but doesn't pick up the dependency.
Is there a way of naming the interfaces so that the dependencies are picked up correctly? At the moment, I seem to have to make the service class depend on the JPA interface directly.
I have a JPARepository that implements another interface. The idea being that alternative implementations of the same interface could be applied. It's a conversation starter with students.
e.g.
I then have a service class that depends on
CharityRepository
. The Spring extension picks up the JPA repository as a component, but doesn't pick up the dependency.Is there a way of naming the interfaces so that the dependencies are picked up correctly? At the moment, I seem to have to make the service class depend on the JPA interface directly.
Thanks