title: Post request with json string as body and add validation to it
body: <p>I am trying to add string input to spring boot application. The content type is json and I am trying to add validation to it.</p>
  
  <pre><code>@RestController
  @RequestMapping(value = "/entries")
  public class SampleController {
  
      @RequestMapping(method = RequestMethod.DELETE)
      @ResponseStatus(value = HttpStatus.NO_CONTENT)
      public void delete(@RequestBody @NotBlank(message = "{field.required}") String username) throws Exception {
          //some logic
      }
  
  }
  </code></pre>
  
  <p>For some reasons, <code>@Notblank</code>  annotation does not work.</p>
  
  <p>Is it right way to do it.</p>