Which interface in Spring Boot is used to create custom validators for a class?
- Validator
- Validatable
- ValidationInterface
- SpringValidator
In Spring Boot, the interface used to create custom validators for a class is Validator. You can implement this interface to define custom validation logic for your domain objects. It allows you to specify the conditions under which an object is considered valid. The other options (Validatable, ValidationInterface, and SpringValidator) are not standard Spring Boot interfaces for creating custom validators.
Loading...
Related Quiz
- How can you enable transaction management in a Spring Boot application?
- How can you customize the token endpoint response of an OAuth2 Authorization Server in Spring Boot?
- How would you secure RESTful web services in Spring Security using OAuth2?
- Which of the following tools can be used for profiling a Spring Boot application?
- In Spring Boot, using the _____ annotation in test classes allows selectively enabling parts of the application context, making tests more focused and faster.