I don't know if the title is confusing, but let's say I have this interface:
@Produces(MediaType.APPLICATION_JSON)
@Path("/user")
public interface UserService {
@GET
@Path("/{userId}")
public Response getUser(@PathParam("userId") Long userId);
}
Why when I try to implement a version Eclipse rewrites annotation for the overridden method but not for the class?
class UserServiceImpl implements UserService {
@Override
@GET
@Path("/{userId}")
public Response getUser(@PathParam("userId") Long userId) {
// TODO Auto-generated method stub
return null;
}
}
I was trying to create a standard definition for the restful web service and then having different implementations. Is something like this possible with standard jax-rs? Am I using wrong annotations by any chance?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…