Good morning
I need to create a repository "B" from a repository "A" which should no longer be modified. I have some doubts about how to proceed since I am having an ambiguity error on my first attempt.
I have my repository A:
@Repository
public class consultasRepositorioImpl implements consultasRepositorio
{
}
Now, in repository B I did the following:
@Repository
public class consultasRepositorioAuxImpl extends consultasRepositorioImpl implements consultasRepositorioAux
{
}
The new operations that I am going to handle are in the interface RepositorioAux .
I want Spring to recognize my class RequestsAuxImpl as a new repository, but I am having the following error when trying to raise my application:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [mx.repositories.consultasRepositorio] is defined: expected single matching bean but found 2: [queriesRepositorioImpl, queriesAuxImplRepository]
I understand that I can solve the above using the annotation @Qualifier where inject the bean. My question is, is there no other way to solve this problem of ambiguity? maybe I'm misapplying the inheritance or the annotations.
any support is appreciated
Greetings