Join Alex Theedom for an in-depth discussion in this video Add the media types, part of RESTful Service with JAX-RS 2.0.
- [Instructor] Okay, we're back…in our book resource class.…Let's add some producer's annotations…to the get all book method…and let's hit, produce JSON data.…So, we start by annotating the method,…our producers,…and we pass it our media type,…application,…JSON.…And we're gonna annotate…some more of our methods.…The next method we're going to annotate…is going to be our Save Book method.…Now remember,…this method produces…and consumes JSON data.…So, we're gonna annotate it with both…produces and consumes annotations.…
So again,…we are starting…to annotate…our media type, like so.…And then we're going to consume…our JSON,…like so.…Again, application…JSON.…Now we're going to finish off by…annotating our, Get Book By ISBN method.…This method produces JSON.…So again,…annotating this method…in the same manner as the other ones.…Like so.…
So, now our methods are annotated.…We can deploy our application.…And by using Postman,…which we installed in a previous video,…we can test our endpoints.…And to deploy our application…we're gonna do this from the command line.…
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
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.