Join Alex Theedom for an in-depth discussion in this video Path parameters, part of RESTful Service with JAX-RS 2.0.
- [Narrator] So far, we have seen how to annotate…resource methods with HTTP methods GET and POST,…But there are more HTTP methods than just those.…We have a whole list of those methods on the screen here.…However, in the bookshelf application,…we're only going to use GET, POST, DELETE, and PUT.…We have seen that a resource method can accept…two resource instances as a parameter.…This resource instance is created…from an HTTP body of a POST request.…It is deserialized from the JSON payload of the HTTP Body,…to a book instance, which can then be persisted…in the persistence layer of the application.…
Now is a good time to talk about path parameters.…So, what are path parameters?…Well, they are variables that are embedded in the URI.…As an example, consider the URI that you see here.…It has a variable,…123456789…embedded in it…and in this case, it happens to be an ISBN of a book.…And what we want to do here is to retrieve it and use it.…If this is a GET request, the REST API should respond…with the book resource that corresponds with that ISBN.…
Join Alex Theedom as he guides you through a wide range of topics, including how to define resource endpoints, how to add dynamism to your application with hypermedia, how to maintain data integrity with Bean Validation, and how to process messages with the JSON Processing API. Once you have completed this course, you'll be ready to develop your own client and server RESTful APIs.
- Discover the extent of JAX-RS's features
- Use the annotation methodology
- Use the inheritance methodology
- Define a REST contract and API root
- Create the REST resource entity
- Create the REST resource methods
- Understand consumers and producers
- Work with different media types
- Define and work with path parameters
- Build a REST response and handle exceptions
- Implement Bean Validation and manage failures
- Create a RESTful client that consumes the web service
- Use JSON-P API with the REST client
- Implement hypermedia (HATEOAS)
Skill Level Intermediate
WebSocket Programming with Java EEwith Alex Theedom1h 29m Intermediate
1. JAX-RS 2.0
2. Introduction to Bookshop Application
3. Create a REST Resource
4. Responses and HATEOAS
5. Bean Validation API
6. Create a REST Client
Next steps1m 20s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.