java - Separating spring cxf jaxrs:server definition into multiple xml files -


i have following cxf spring jaxrs:server definition rest endpoints:

<jaxrs:server id="my-server" address="/address">     <jaxrs:servicebeans>         <ref bean="bean1"/>         <ref bean="bean2"/>         <ref bean="bean3"/>            <ref bean="bean4"/>         <ref bean="bean5"/>     </jaxrs:servicebeans> </jaxrs:server> 

i need split rest endpoint definitions multiple modules within project. example:

server-config1.xml

<jaxrs:server id="my-server" address="/address">     <jaxrs:servicebeans>         <ref bean="bean1"/>         <ref bean="bean2"/>         <ref bean="bean3"/>     </jaxrs:servicebeans> </jaxrs:server> 

server-config2.xml

<jaxrs:server id="my-server" address="/address">     <jaxrs:servicebeans>         <ref bean="bean4"/>         <ref bean="bean5"/>     </jaxrs:servicebeans> </jaxrs:server> 

the 2 projects built bundles deployed jboss fuse. first bundle deploys , starts. second bundle fails error address in use.

how can reference/reuse existing jaxrs:server definition 1 spring config file within another? can't change address of second server definition code need change. note both server definitions not installed 1 may not available (different clients different endpoints). each rest endpoint has unique @path definition.

i using cxf v2.7


Comments