Bean Validation Using The Hibernate Validator
Let’s learn to validate the request data for the REST APIs.
We'll cover the following...
We'll cover the following...
Add validation dependency
First, let’s add the validation dependency provided by Spring Boot— spring-boot-starter-validation—into our build.gradle file.
This will add the required hibernate-validator dependency to our todo appilcation, allowing us to express and validate constraints on the entity for request validation.
Entity setup for validation
Javax’s validation framework provides a few annotations like ...