I have the following dependency in the pom.xml for spring boot validation and controller method argument updated with @Valid annotation but still no validation errors when I submit a request with null or not empty values. Any Idea like why validation not getting trigged even though hibernate validation library on the classpath.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
@RequestMapping("hello")
public ResponseEntity<String> message(@Valid @RequestBody MyRequest request)
{
public class MyRequest {
@NotNull(message = "Client ID is mandatory")
@NotEmpty
private String clientId;
@NotEmpty private String employId;