title: spring boot timing of output @Requestbody and @Responsebody
body: <pre><code>@Before("within(control..*)")
  public void before(JoinPoint joinPoint) {
      // Set Process Start Time
      startTime = System.currentTimeMillis();
      Object[] arguments = joinPoint.getArgs();
      if (arguments != null &amp;&amp; arguments.length &gt; 0) {
          System.out.println("data:" + arguments[0]);
      }
  }
  </code></pre>
  
  <p>I tried to use @aspect to output tht request body, but if the parameter is wrong when using @valid, spring boot will throw MethodArgumentNotValidException, and @aspect logs will not be output.</p>
  
  <p>How can I output the json request body at the time when server receives a http request even there is an exceptinon happened? </p>