Implementing Bean Validation into a REST endpoint is simple. Thanks to integration of Bean Validation into this API. In this video, see how simple it is to ensure data integrity into a REST endpoint and then how to test it using a REST client.
- [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 transactions.…Okay, so, that's my resource path.…
In this course, you can journey through the many constraints that are built into the 2.0 version of the Bean Validation API, as well as the additional constraints provided by the Hibernate Validator 6.0. Learn Bean Validation in a practical way while you build a functioning web application. Instructor Alex Theedom shows how to extend the API with custom constraints and how to internationalize validation failure messages. Plus, learn advanced techniques such as cross-field and cross-parameter validation, and how Bean Validation integrates with other Java EE technologies such as JAX-RS, Java Persistence API (JPA), and JavaServer Faces (JSF). By the end of this course, you will have gained practical experience of using Bean Validation in a real web application and be able to implement what you have learned in your own Java applications.
- What is Bean Validation?
- Applying the built-in constraints
- Applying Hibernate constraints
- Designing custom constraint validators
- Managing and configuring validation failure messages
- Creating custom composite constraints
- Creating custom validation constraints
- Cross-field and cross-parameter validation
- Integration with RESTful web services (JAX-RS)
Skill Level Intermediate
WebSocket Programming with Java EEwith Alex Theedom1h 29m Intermediate
Java Platforms Compared: SE vs EE vs MEwith Peggy Fisher25m 38s Intermediate
1. What Is Bean Validation?
2. Course Project Introduction
3. Applying Built-In Bean Validation Constraints
4. Applying Hibernate Bean Validation Constraints
5. Designing Custom Constraint Validators
6. Bean Validation Failure Messages
7. Advanced Bean Validation Features
Advanced constraint usage1m 52s
Next steps1m 50s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.