Spring -- inject 2 beans of same type 저는 주입된 필드를 만들 수 있기 때문에 건설자 기반 주입을 좋아합니다.final. 또한 주석 구동 주입을 통해 내 작업을 단순화할 수 있기 때문에 좋아요.context.xml. 나는 나의 시공자를 표시할 수 있습니다.@Autowired같은 종류의 매개변수가 두 개만 없다면 모든 것이 잘 작동합니다.예를 들어, 수업이 있습니다. @Component public class SomeClass { @Autowired(required=true) public SomeClass(OtherClass bean1, OtherClass bean2) { … } } and an application context with: 클래스의 생성자에 bean ID를 ..