javarestmavengwtresty-gwt

Rest Cannot be resolved to a type


I'm trying to write my Rest Interface with restygwt therefore I inherit

<inherits name='org.fusesource.restygwt.RestyGWT' />

and also added the dependency into my pom file.

import java.awt.PageAttributes.MediaType;

import org.fusesource.restygwt.client.MethodCallback;
import org.fusesource.restygwt.client.RestService;

@Path("/user")
public interface UserRestService extends RestService {

    @GET
    @Path("/users")
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    public void getUsers(MethodCallback<List<User>> callback);
}

All my Annotations cannot be resolved to a type. Is there also another library necessary or what am I missing?


Solution

  • You can use JAX-RS 2.0 annotations

    <dependency>
      <groupId>javax.ws.rs</groupId>
      <artifactId>javax.ws.rs-api</artifactId>
      <version>2.0</version>
    </dependency>