users@jersey.java.net

[Jersey] Re: Restful interfaces and Jersey

From: Richard Kolb <rjdkolb_at_gmail.com>
Date: Mon, 26 May 2014 14:38:19 +0200

Oops

This does work :)
Problem between computer and chair.

Regards,
Richard.
On 26 May 2014 14:20, "Richard Kolb" <rjdkolb_at_gmail.com> wrote:

> Hello
>
> It is possible for Jersey to handle annotations on interfaces ?
> i.e. Annotations on an interface and not on the implementation.
>
> @Path("customers")
> public interface CustomerService {
> @GET
> @Produces("application/json")
> public List<Customer> listAllCustomers();
>
> --------------------------------------------------------------
> public class CustomerServiceImpl implements CustomerService {
> @Override
> public List<Customer> listAllCustomers() {
>
> --------------------------------------------------------------
> @javax.ws.rs.ApplicationPath("webresources")
> public class ApplicationConfig extends Application {
> private void addRestResourceClasses(Set<Class<?>> resources) {
> resources.add(discovery.gxtapp.shared.Customer.class);
> resources.add(discovery.gxtapp.server.CustomerServiceImpl.class);
>
> thanks
> Richard.
>
>