如何在 JAXRS 中使用端点详细信息充实我的上下文配置?
这是我对 JAXWS 的了解:
<jaxws:endpoint id="s-myService" implementor="#myService"
serviceName="s2:MyService"
endpointName="e2:MyServiceEndpoint"
address="/my-service/soap/base"
publishedEndpointUrl="http://localhost:8080/my-service/soap/base"
xmlns:s2="http://localhost:8080/example-service/ns"
xmlns:e2="http://localhost:8080/example-service/ns"
/>
如何使以下 JAXRS 端点实现相同的细节?
<jaxrs:server id="r-myService"
address="/my-service/rest/base">
<jaxrs:serviceBeans>
<ref bean="myRestService" />
</jaxrs:serviceBeans>
<jaxrs:providers>
<bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider" />
<ref bean="SomethingGives"/>
</jaxrs:providers>
<jaxrs:extensionMappings>
<entry key="json" value="application/json" />
<entry key="xml" value="application/xml" />
</jaxrs:extensionMappings>
</jaxrs:server>
我真的很想看到publishedEndpointUrl 在REST 服务中得到充实。JAXRSServerFactoryBean的 API暗示它可以通过继承的字段来完成。上下文配置应该如何实现?