Required Multiple beans of same type in Spring
You should qualify your autowired variable to say which one should be injected @Autowired @Qualifier(“A1Unmarshaller”) private Jaxb2Marshaller A1Unmarshaller; The default autowiring is by type, not by name, so when there is more than one bean of the same type, you have to use the @Qualifier annotation.