Spring bean 생성자에서 @Autowired가 잘못 사용된 위치를 보고합니다(2개 이상의 @Autowired 생성자, 일치하지 않는 @Autowired 생성자 등).
예:
@Component
public class MyComponent {
@Autowired
public MyComponent(BarBean bean) {...} // '단 하나의 @Autowired 생성자만 허용됩니다'라고 보고됩니다
@Autowired
public MyComponent(FooBean bean) {...} // reports 'Only one @Autowired constructor is allowed'
}
@Component
public class MyFactory { // '일치하는 @Autowired 생성자가 없습니다'라고 보고됩니다
public MyFactory(String str) {...}
public MyFactory(int count) {...}
}