I have the following...
package package1;
@Service
@Qualifier("kb")
public class UserService {
...
}
package package2;
@Service
@Qualifier("user")
public class UserService {
...
}
@Autowired
@Qualifier("user")
package2.UserService p2;
@Autowired
@Qualifier("kb")
package1.UserService p1;
But when I try to run this I get...
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [boot.Application]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'userService' for bean class [package1.UserService] conflicts with existing, non-compatible bean definition of same name and class [package2.UserService]
How do I have 2 Services with the same name?