structurizr / java-extensions

Structurizr for Java extensions
Apache License 2.0
39 stars 23 forks source link

Dependency to JPA Repository that implements another interface #62

Open carljonescf opened 2 years ago

carljonescf commented 2 years ago

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.

Thanks