I have two beans with the same name in different packages:
package A;
class EMDao {}
package B;
class EMDao {}
package C;
import B.EMDao;
class EMService { @Resource EMDao emDao; }
I get this exception:
org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name for bean class EMDao conflicts with existing, non-compatible bean definition of same name and class B.EMDao.
Now I am trying to do this:
package B;
@Qualifier(value="bEMDao")
class EMDao {}
package C;
import B.EMDao;
class EMService { @Qualifier(value="bEMDao") @Resource EMDao emDao; }
But I am still getting the same error.
Any help would be greatly appreciated.
Thanks