From the course: Java EE 8 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Creating a resource

Creating a resource - Java EE Tutorial

From the course: Java EE 8 Essential Training

Start my 1-month free trial

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…

Contents