In Spring Boot, to apply validation constraints on a field, the _____ annotation is used along with specific constraint annotations.
- @Constraint
- @ConstraintValidation
- @Validated
- @Validation
In Spring Boot, the @Validated annotation is used along with specific constraint annotations like @NotBlank, @Min, @Max, etc., to apply validation constraints on a field. The @Validated annotation indicates that the validation should be performed on the annotated field or method parameter. It is a fundamental part of Spring Boot's validation framework.
Loading...
Related Quiz
- You are tasked with creating a custom Auto Configuration that provides a set of beans only if a specific library is on the classpath. How would you approach this requirement?
- In Spring Cloud, how can you enable a service to register itself with Eureka Server?
- Which interface in Spring Boot is used to create custom validators for a class?
- What considerations should be taken into account when choosing between Flyway and Liquibase for a large-scale, complex Spring Boot application?
- Which annotation is used to inject a bean dependency into a Spring component?