1.

Name some important annotations of JAX-RS API.

Answer»

Some important annotations of the JAX-RS API include: 

  • @Path: It is specially used to specify the relative path of resource class and methods. This annotation can be used on any class or method in code. It binds the URI pattern to a JAVA method.
  • @GET, @PUT, @POST, @DELETE, @HEAD: It is specially used to specify HTTP request type for a method. These annotations can be specified on the JAX-RS method.
  • @Produces: This annotation is specially used to specify HTTP responses generated by WEB SERVICES.
  • @Consumes: This annotation is specially used to specify HTTP Requests.  
  • @PathParam: It is specially used to specify parameters to path value by PARSING.  


Discussion

No Comment Found