注入jaxb2Marshaller获取以下异常
找不到[org.springframework.oxm.jaxb.Jaxb2Marshaller]类型的限定bean用于依赖:预期至少有1个bean可以作为此依赖项的autowire候选者。依赖注释:{@ org.springframework.beans.factory.annotation.Autowired(required = true)}
@Autowired
private Jaxb2Marshaller jaxb2Marshaller;
public Jaxb2Marshaller getJaxb2Marshaller() {
return jaxb2Marshaller;
}
public void setJaxb2Marshaller(Jaxb2Marshaller jaxb2Marshaller) {
this.jaxb2Marshaller = jaxb2Marshaller;
}
getJaxb2Marshaller()。unmarshal(new StreamSource(new ByteArrayInputStream(source.getData()。getBytes()));;
任何人都可以建议如何注入jaxb2Marshaller ??