From the course: Java EE: Bean Validation

Unlock the full course today

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

Bean Validation and RESTful webservices implementation

Bean Validation and RESTful webservices implementation

From the course: Java EE: Bean Validation

Start my 1-month free trial

Bean Validation and RESTful webservices implementation

- [Instructor] Okay, to add a rest endpoint to my application, the first thing I need to do is to add an application path. So, what I'm going to do is I'm going to create that in, as part of my application. Right here in the root part. All I need to do is to create a Java Class and I'm just going to call it something simple like RESTconfig. And I need it to extend the application class. And I need to annotate it with my application path. I need to pass it to path for the route of my application which I want to be simply API. And that's all I need to do in order to start configuring my rest endpoint. Once I've done that, I'm going to go to the rest folder and in the rest folder, I'm going to create my actual resource endpoint. So I need to create a Java Class. I'm going to call my resource endpoint TransactionResource like so. This class doesn't need to extend anything, but it does need to have a resource endpoint. So, again, I just simply add here's my path and I'm going to call it…

Contents