title: Spring Boot not raising DataBufferLimitException
body: <p>I'm using Spring Boot in one application of mine and I wanted to block payloads that are too big for my application to process, thus, avoiding my app to crash.</p>
  <p>As far as I understand I should be able to do this by handling the exception DataBufferLimitException, and that I have done via the snippet below:</p>
  <pre class="lang-java prettyprint-override"><code>@ExceptionHandler(DataBufferLimitException.class)
  @ResponseStatus(HttpStatus.FORBIDDEN)
  public ErrorResponse handleDataBufferLimitException(DataBufferLimitException ex) {
      errorResponse == ###build error response
      return errorResponse;
  }
  </code></pre>
  <p>I've tested calling this endpoint with a big payload but the exception never gets thrown by spring-boot, even when sending big payloads that end up crashing my app.
  Also, on the same file that I'm handling this exception, there is the handling of other exceptions, and those are handled as expected.</p>
  <p>I have tried to explicitly set a limit for my payload size using those lines on my application.properties file:</p>
  <pre class="lang-none prettyprint-override"><code>server.tomcat.max-http-post-size=1MB
  server.tomcat.max-swallow-size=1MB
  spring.servlet.multipart.max-request-size=1MB
  </code></pre>
  <p>But that explicit set also seem to be ignored, since the exception never gets thrown.</p>
  <p>Here you can find all spring-relevant parts of my pom:</p>
  <pre class="lang-xml prettyprint-override"><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.yaml&lt;/groupId&gt;
                  &lt;artifactId&gt;snakeyaml&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-amqp&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  </code></pre>
  <p>Am I missing anything here?</p>