Author: buildbot Date: Tue Feb 3 13:47:22 2015 New Revision: 938798 Log: Production update by buildbot for cxf
Modified: websites/production/cxf/content/cache/docs.pageCache websites/production/cxf/content/docs/jaxrs-services-configuration.html Modified: websites/production/cxf/content/cache/docs.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/cxf/content/docs/jaxrs-services-configuration.html ============================================================================== --- websites/production/cxf/content/docs/jaxrs-services-configuration.html (original) +++ websites/production/cxf/content/docs/jaxrs-services-configuration.html Tue Feb 3 13:47:22 2015 @@ -118,11 +118,11 @@ Apache CXF -- JAXRS Services Configurati <!-- Content --> <div class="wiki-content"> <div id="ConfluenceContent"><p> </p><p> </p><p> </p><p> <span class="inline-first-p" style="font-size:2em;font-weight:bold">JAX-RS : Services Configuration</span> </p><p> </p><p> </p><p> </p><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1419015907816 {padding: 0px;} -div.rbtoc1419015907816 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1419015907816 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1422971215270 {padding: 0px;} +div.rbtoc1422971215270 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1422971215270 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1419015907816"> +/*]]>*/</style></p><div class="toc-macro rbtoc1422971215270"> <ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesConfiguration-ConfiguringJAX-RSservicesprogrammatically">Configuring JAX-RS services programmatically</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-OSGI">OSGI</a> <ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesConfiguration-Blueprint">Blueprint</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-Spring">Spring</a></li></ul> </li><li><a shape="rect" href="#JAXRSServicesConfiguration-ConfiguringJAX-RSendpointsprogrammaticallywithoutSpring">Configuring JAX-RS endpoints programmatically without Spring</a></li><li><a shape="rect" href="#JAXRSServicesConfiguration-ConfiguringJAX-RSservicesincontainerwithSpringconfigurationfile.">Configuring JAX-RS services in container with Spring configuration file.</a> @@ -807,11 +807,29 @@ sf.setResourceProvider(new PerRequestRes --> <jaxrs:client address="http://customers" basePackages="a.b.c,d.e.f"/> - -</beans> +Â </beans> + +]]></script> +</div></div><p>Note the above does not require Spring annotations such as @Component added to JAX-RS provider or resources.</p><p>If you prefer doing a pure Spring-based auto-discovery you can have @Component added to JAX-RS application classes and do</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:jaxrs="http://cxf.apache.org/jaxrs" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd + http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd"> + + <import resource="classpath:META-INF/cxf/cxf.xml" /> + + <!-- + Discover all root resources and providers in packages starting from "a.b.c" + --> + <jaxrs:server address="/customers"/> + <context:component-scan base-package="a.b.c"/> + +Â </beans> ]]></script> -</div></div><h1 id="JAXRSServicesConfiguration-ServletandApplicationContainerConfiguration">Servlet and Application Container Configuration</h1><p>Please see this <a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+Deployment">page</a> for more information.</p></div> +</div></div><p> </p><h1 id="JAXRSServicesConfiguration-ServletandApplicationContainerConfiguration">Servlet and Application Container Configuration</h1><p>Please see this <a shape="rect" href="https://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+Deployment">page</a> for more information.</p><p>Starting from CXF 3.1.0: JaxrsServletContextInitializer will be chiiped in a cxf-rt-rs-http-sc module. This will support  no-web.xml and other JAX-RS deployments depending on the container auto-discovery mechanism as described in a 2.3.2 section of JSR-339 (JAX-RS 2.0).</p><p> </p></div> </div> <!-- Content --> </td>