I have a repository B which I extend from another repository A.
Repository A:
@Repository
public class RepositoryA implements Repository {
}
Repository B:
@Repository
public class RepositoryB extends RepositoryA implements RepositoryAux{
}
But when I try to inject the repository I am having the following error:
No unique bean of type [Repository] is defined: expected single matching bean but found 2: [RepositoryA , RepositoryB]
I understand that I can solve it using the annotation @Qualifier. But, my question is:
it's right Overwrite the annotation @Repository in the child class ?
Can I assign a new identifier to the child class? Instead of using annotation @Qualifier, Something like @Id or @Name
Thank's in advance