From the course: Java EE 8 Essential Training
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Creating a resource - Java EE Tutorial
From the course: Java EE 8 Essential Training
Creating a resource
- [Narrator] In this lesson, we're going to create our first JAX-RS resource. To help us with this, you'll notice that I've added the inventory item class into the project. The class is annotated as a JPA entity, because we're going to be using JPA in order to maintain, some state within our JAX-RS API. To get started with building our first resource, we're going to right click on our package, and then go to new and then you'll see JAX-RS resource within the first menu. If you click on that, we get the dialogue for building a resource within eclipse. And one of the nice features is that we can select the target entity. In this case, our resource is going to be the inventory item. So we'll go ahead and select that item. And then we can proceed to name our endpoint, I'm just going to go ahead and accept the default. And then you'll notice that we have been provided with a resource path of inventory items. That's the end…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Rest overview1m 58s
-
(Locked)
JAX-RS overview5m
-
(Locked)
JAX-RS project setup3m 11s
-
(Locked)
Creating a resource5m 16s
-
(Locked)
JAX-RS client posts7m 22s
-
(Locked)
JAX-RS client gets4m 23s
-
(Locked)
URI template parameters2m 49s
-
(Locked)
Asynchronous features7m 51s
-
(Locked)
Reactive features5m 31s
-
(Locked)
Server-Sent Events6m 16s
-
(Locked)
-
-
-
-
-
-