Join Alex Theedom for an in-depth discussion in this video Define the API root, part of RESTful Service with JAX-RS 2.0.
- [Instructor] Let's start by creating the class…that defines the root URI of your rest application.…We create a class in the root of the application structure…and call it rest config.…This is our root of the application…and here we're going to create our class rest config.…Now remember we must sub class…the application class like so.…By extending the application class…and annotate the class application path…and pass it the base URI which is going to be API.…
And by passing it the string API…we're passing it the base URI…from which all rest resources are going to respond.…Now all calls to API are directed to this location.…This class does look a bit empty.…That's fine for our application…and for most simple applications.…But as you advance you can add…more specialized configurations into this class.…So, for example, all resources are processed by default.…By over writing the gate classes method…you can specify which class to register…by returning a set of those classes…and within the application class…you can see a set of methods that can be over written.…
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?
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.