cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] [Commented] (CXF-3725) JAXRS must be able to expose all spring components marked with @Path
Date Mon, 21 Oct 2013 09:56:42 GMT


Sergey Beryozkin commented on CXF-3725:

Hi, thanks for the example, I guess we can also apply the same idea to auto-discovering custom
JAX-RS providers annotated with @Provider. 

How do we tie it though with jaxrs:server endpoint declarations ?

I like Olivier's idea to do something like:

<jaxrs:server id="bookservice" address="/">
  <jaxrs:serviceBeans scan-packages=",">    

or may be even 
<jaxrs:server id="bookservice" address="/" 
The only thing we configure is the endpoint address, the rest is auto-discovered.

In this option we'd probably need to update jaxrs:server Spring handler to initiate a component
scan, something that you have auto-supported by @ComponentScan. I wonder how this would look
like ? 
Any other thoughts ?

Thanks, Sergey

> JAXRS must be able to expose all spring components marked with @Path
> --------------------------------------------------------------------
>                 Key: CXF-3725
>                 URL:
>             Project: CXF
>          Issue Type: New Feature
>          Components: JAX-RS
>            Reporter: Olivier Lamy (*$^¨%`£)
> To ease dev and not to have to declare all beans.
> See sample :
> {code}
> not   
> <jaxrs:server id="bookservice" address="/">
>   <jaxrs:serviceBeans>
>     <ref bean="bookstore"/>
>     <ref bean="bookstoreInterface"/>
>   </jaxrs:serviceBeans>
> </jaxrs:server>
> but 
> <jaxrs:server id="bookservice" address="/">
>   <jaxrs:serviceBeans all-beans="true">
>   </jaxrs:serviceBeans>
> </jaxrs:server>
> All spring components marked with @Path as it will be exposed
> @Path( "/userService/" )
> @Service("userService#rest")
> public class DefaultUserService
>     implements UserService
> {code}

This message was sent by Atlassian JIRA

View raw message