1.

Define RESTful Root Resource Classes in the JAX-RS API?

Answer»
  • A resource CLASS is nothing but a Java class that uses JAX-RS provided annotations for IMPLEMENTING web resources.
  • They are the POJOS that are annotated either with @Path or have at least one METHOD annotated with @Path, @GET, @POST, @DELETE, @PUT, etc.

Example:

import javax.ws.rs.Path;/*** InterviewBitService is a root resource class that is exposed at 'resource_service' path*/@Path('resource_service')public class InterviewBitService { // DEFINED methods}


Discussion

No Comment Found