November 2017
Intermediate to advanced
420 pages
10h 29m
English
In the previous chapter, we discussed the @Path annotation that identifies the URI path that a resource class or class method will serve requests for. A class annotated with the @Path annotation (at the class level) is called the root resource class. You can also use the @Path annotation on the methods of the root resource classes. If a resource method with the @Path annotation is annotated with request method designators such as @GET, @POST, @PUT, or @DELETE, it is known as a subresource method.
The concept of subresources is to have a root resource class that resolves a generic URI path and to have the @Path annotated methods in the class to further resolve the request. This helps you to keep the REST resource class ...