autowired = "byType"속성을 가진 하나의 bean 이름 "MasterService"가 있습니다. 그 빈에서 나는 하나의 속성을 가지고있다. AccountService accountService; 그리고이 빈의 구현을 "DefaultAccountService"로 등록했습니다. 이제 누군가가 'DefaultAccountService'를 확장하고 'CustomAccountService'를 생성하려고합니다. 또한 "MasterService"를 초기화하는 동안 등록하지만 AccountService [DefaultAccountService 및 CustomAccountService]에 2 개의 Bean이 있다는 예외가 발생합니다. 이 문제를 해결하는 방법을 모릅니다. 귀하의 경우Autowire 'byType'에 대한 Spring Beam Override 문제
http://www.mkyong.com/spring/spring-autowiring-qualifier-example/
, 그것은 다음과 같습니다 :
@Autowired
@Qualifier("customAccountService")
private AccountService accountService;