title: Create a new Object with @RequestBody(required=false)
body: <p>I have a Rest Controller with an optional <code>@RequestBody</code> parameter, that I want to initialize if a user does not specify it. Now I'm doing this:</p>
  
  <pre><code>@PostMapping
  public ResponseEntity&lt;Page&lt;?&gt;&gt; findAll(
              @RequestBody(required=false) MyRequest request,
              Pageable pageable
          ) {
    if (request == null) {
      request = new MyRequest();
    }
  ...
  }
  </code></pre>
  
  <p>Is there any automatic way to tell Spring MVC that in case the parameter is null it must create a new object?</p>