title: Log raw request body before deserialization in Spring Boot REST controller
body: <p>Given the following, kind of basic, REST controller in Spring Boot:</p>
  <pre class="lang-java prettyprint-override"><code>@RestController
  public class NotificationController {
  
      @PostMapping(path = &quot;/api/notification&quot;)
      public void handleNotification(@RequestBody @Valid NotificationRequest request) {
          System.out.println(request.getMessage());
      }
  }
  </code></pre>
  <p>One requirement is to log the incoming request body <strong>before</strong> deserializing it to a <code>NotificationRequest</code>. We'd like to have a trace, e.g. if the request is not well-formed. My first idea was to use the <code>HttpServletRequest</code> directly but then I would lose the validation and automatic deserialization.</p>
  <pre class="lang-java prettyprint-override"><code>public void handleNotification(HttpServletRequest httpRequest) {
    // ...
  }
  </code></pre>
  <p>Is there some mechanism to log the incoming &quot;raw&quot; request body for this particular endpoint?</p>