Java 如何在xml中与Rest客户端Apache CXF配置一起使用Autowired
如何将Java 如何在xml中与Rest客户端Apache CXF配置一起使用Autowired,java,spring,jax-rs,cxf-client,Java,Spring,Jax Rs,Cxf Client,如何将@Autowired与Apache CXF JAXR的配置xml一起使用 我在Spring的配置文件xml中有一个带有ApacheCxf-JAXRs的un客户端,但当尝试使用@AutowiredSpring时,我看到了一个例外(没有类型的合格bean),我需要使用@Autowired,只使用对象 clientCxf.xml 注意:我看到这个配置构建了一个代理类型对象和JAXRSClientFactoryBeanDefinitionParser@Qualifier(value=“hell
@Autowired
与Apache CXF JAXR的配置xml一起使用
我在Spring的配置文件xml中有一个带有ApacheCxf-JAXRs的un客户端,但当尝试使用@Autowired
Spring时,我看到了一个例外(没有类型的合格bean),我需要使用@Autowired
,只使用对象
clientCxf.xml
注意:我看到这个配置构建了一个代理类型对象和JAXRSClientFactoryBeanDefinitionParser@Qualifier(value=“helloWorldService.proxyFactory”)
java
@WebService
@路径(“/消息”)
公共接口IHelloWorldService{
@职位
@路径(“/getMsg”)
公共结果(Pregunta Pregunta);
}
示例@Autowired
不起作用:
@Autowired
私有IHelloWorldService helloWorldService;
工作:
@Autowired
@限定符(“helloWorldService”)
私有对象helloWorldService;
注意:对于这段代码,我需要cast接口por示例:
IHelloWorldService helloWorldServiceC=(IHelloWorldService)helloWorldService;
我尝试了配置,但没有工作
@enableAspectProxy(proxyTargetClass=true)
请帮助我获取我不再需要的@Autowired配置xml