Spring boot validation annotations @Valid and @NotBlank not working : <p>Given below is my main controller from which i am calling getPDFDetails method.</p>

<pre><code>@RequestMapping(value=PATH_PRINT_CONTRACTS, method=RequestMethod.POST)
    public ResponseEntity&lt;?&gt; printContracts(@RequestBody final UpdatePrintContracts updatePrintContracts) throws Exception {

        System.out.println("contracts value is "+ updatePrintContracts);

        Integer cancellationReasons = service.getPDFDetails(updatePrintContracts);

        System.out.println("success!");

        return ResponseEntity.ok(cancellationReasons);
    }   
</code></pre>

<p>Below is the UpdatePrintContracts class where i have defined all the variables with validation annotations and corresponding getter/setter methods.</p>

<pre><code>public class UpdatePrintContracts {

    @Valid
    @NotBlank
    @Pattern(regexp = "\\p{Alnum}{1,30}")
    String isReprint;

    @Valid
    @NotBlank
    Integer dealerId;

    @Valid
    @NotBlank
    @Pattern(regexp = "\\p{Alnum}{1,30}")
    String includeSignatureCoordinates;

    @Valid
    @NotBlank
    java.util.List&lt;Integer&gt; contractNumbers;

    public String getIsReprint() {
        return isReprint;
    }

    public void setIsReprint(String isReprint) {
        this.isReprint = isReprint;
    }

    public Integer getDealerId() {
        return dealerId;
    }

    public void setDealerId(Integer dealerId) {
        this.dealerId = dealerId;
    }

    public String getIncludeSignatureCoordinates() {
        return includeSignatureCoordinates;
    }

    public void setIncludeSignatureCoordinates(String includeSignatureCoordinates) {
        this.includeSignatureCoordinates = includeSignatureCoordinates;
    }

    public java.util.List&lt;Integer&gt; getContractNumbers() {
        return contractNumbers;
    }

    public void setContractNumbers(java.util.List&lt;Integer&gt; contractNumbers) {
        this.contractNumbers = contractNumbers;
    }

}
</code></pre>

<p>I am trying to Run the application as Spring boot app by right clicking on the project (Run As) and passing blank values for variables isReprint and includeSignatureCoordinates thru Soap UI. However the validation doesn't seem to work and not throwing any validation error on the Soap UI. What am i missing? Any help is appreciated!</p>
