users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: service locators and class-level @Path

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Mon, 20 Feb 2012 21:33:58 +0000

Hi
On 20/02/12 19:34, Bill Burke wrote:
> i have a bug from a user that I"m not sure its a bug or not because the
> spec isn't clear:
>
> The spec allows a service locator that has no @Path annotation on the
> class:
>
> public class MyLocator {
>
> @GET
> public String foo() {..}
>
>
> Now, if this class has a @Path on it, is that @Path ignored or not when
> matching?
>
>
> @Path("abc")
> public class MyLocator {
>
> @GET
> public String foo() {...}
> }
>
>
> @Path("/test")
> public class MyService {
>
> @Path("/locator")
> public MyLocator getLocator() {...}
>
> }
>
>
> So, to get to call teh foo() method is the path "/test/locator/abc" or
> /test/locator"? Is the class level @Path ignored or not?
>
>
@Path("abc") is ignored when MyLocator instance serves as a locator afaik

Sergey



-- 
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com