我有一个applicationContext.xml,我在其中配置我的所有web服务,如下所示 -
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<jaxrs:server id="restContainer" address="/">
<jaxrs:serviceBeans>
<ref bean="bookService" />
<ref bean="movieService" />
</jaxrs:serviceBeans>
</jaxrs:server>
<bean id="bookService" class="com.informit.apachecxfexample.BookServiceImpl"/>
<bean id="movieService" class="com.informit.apachecxfexample.MovieServiceImpl"/>
但是只能调用第一个服务(bookService)。如果我将引用bean的顺序更改为
<ref bean="movieService" />
<ref bean="bookService" />
在上面的例子中,只调用了movieService。
有没有办法调用applicationContext.xml中配置的所有服务?