From the course: Java EE: RESTful Service with JAX-RS 2.0

JAX-RS 2.0 introduction

From the course: Java EE: RESTful Service with JAX-RS 2.0

Start my 1-month free trial

JAX-RS 2.0 introduction

- [Instructor] JAX-RS is the Java API for RESTful web services, normally shortened to just JAX-RS, and is Java's implementation of the REST architectural pattern, and provides a simple way to create RESTful APIs. It also provides support for hypermedia by following the HATEOAS model, which we will discuss later on in the course. JAX-RS 1.1 was standardized in Java EE 6 and became an official part of the specification. It was updated in Java EE 7 to release version 2.0, and development continues with a new release plan for Java EE 8. JAX-RS is annotation driven. This is important because it makes it very easy to represent and code the elements that form parts of the REST pattern. This means that the class that represents the root of a resource will be annotated "Path," and methods that respond to HTTP requests are annotated appropriately with the annotation that echos the HTTP verb, such as the POST annotation for POST requests, and the GET annotation for GET requests. Likewise, query parameters and path variables are easily accessible with the logically named annotations QueryParam and PathParam. And content types are defined using the Consumes and Produces annotations. There are many more useful annotations in JAX-RS, but these are just some of the annotations I will covering in this course.

Contents