1. 08 4月, 2021 1 次提交
    • A
      Support "Accept-Patch" for unsupported media type · a2d91a56
      Arjen Poutsma 提交于
      This commit introduces support in both servlet and webflux for the
      "Accept-Patch" header, which is sent when the client sends unsupported
      data in PATCH requests.
      See  section 2.2 of RFC 5789.
      
      Closes gh-26759
      a2d91a56
  2. 30 1月, 2021 1 次提交
  3. 16 9月, 2019 1 次提交
  4. 05 9月, 2019 1 次提交
  5. 01 9月, 2019 1 次提交
  6. 23 3月, 2019 1 次提交
  7. 22 3月, 2019 1 次提交
  8. 23 10月, 2018 1 次提交
    • R
      Restore log level for resolved exceptions · 41e6aa6d
      Rossen Stoyanchev 提交于
      The fix for SPR-17178 switched from debug to warn level warning for
      all sub-classes of AbstractHandlerExceptionResolver where the request
      concerned the DefaultHandlerExceptionResolver only.
      
      This commit restores the original DEBUG level logging that was in
      AbstractHandlerExceptionResolver from before SPR-17178. In addition
      DefaultHandlerExceptionResolver registers a warnLogCategory by default
      which enables warn logging and hence fulfilling the original goal
      for SPR-17178.
      
      Issue: SPR-17383
      41e6aa6d
  9. 17 9月, 2018 1 次提交
  10. 15 8月, 2018 2 次提交
  11. 31 7月, 2018 2 次提交
  12. 28 6月, 2018 1 次提交
  13. 19 6月, 2018 1 次提交
  14. 05 5月, 2018 2 次提交
  15. 02 3月, 2018 1 次提交
  16. 01 2月, 2018 1 次提交
  17. 17 8月, 2017 1 次提交
  18. 07 6月, 2017 1 次提交
    • J
      Consistent use of @Nullable across the codebase (even for internals) · f813712f
      Juergen Hoeller 提交于
      Beyond just formally declaring the current behavior, this revision actually enforces non-null behavior in selected signatures now, not tolerating null values anymore when not explicitly documented. It also changes some utility methods with historic null-in/null-out tolerance towards enforced non-null return values, making them a proper citizen in non-null assignments.
      
      Some issues are left as to-do: in particular a thorough revision of spring-test, and a few tests with unclear failures (ignored as "TODO: NULLABLE") to be sorted out in a follow-up commit.
      
      Issue: SPR-15540
      f813712f
  19. 31 5月, 2017 1 次提交
  20. 27 5月, 2017 1 次提交
    • S
      Introduce null-safety of Spring Framework API · 87598f48
      Sebastien Deleuze 提交于
      This commit introduces 2 new @Nullable and @NonNullApi
      annotations that leverage JSR 305 (dormant but available via
      Findbugs jsr305 dependency and already used by libraries
      like OkHttp) meta-annotations to specify explicitly
      null-safety of Spring Framework parameters and return values.
      
      In order to avoid adding too much annotations, the
      default is set at package level with @NonNullApi and
      @Nullable annotations are added when needed at parameter or
      return value level. These annotations are intended to be used
      on Spring Framework itself but also by other Spring projects.
      
      @Nullable annotations have been introduced based on Javadoc
      and search of patterns like "return null;". It is expected that
      nullability of Spring Framework API will be polished with
      complementary commits.
      
      In practice, this will make the whole Spring Framework API
      null-safe for Kotlin projects (when KT-10942 will be fixed)
      since Kotlin will be able to leverage these annotations to
      know if a parameter or a return value is nullable or not. But
      this is also useful for Java developers as well since IntelliJ
      IDEA, for example, also understands these annotations to
      generate warnings when unsafe nullable usages are detected.
      
      Issue: SPR-15540
      87598f48
  21. 06 5月, 2017 1 次提交
    • R
      Remove HttpStatus from HttpMessageConversionException · 4d962a17
      Rossen Stoyanchev 提交于
      HttpMessageConverter's are client and server and arguably shouldn't
      contain a server-side concept such a response status.
      
      The status field is recent, it was added to differentiate 400 vs 500
      errors with Jackson 2.9+ but there is no need for it since the same
      distinction is reflected in raising an HttpMessageNotReadableException
      vs a general HttpMessageConversionException.
      
      Issue: SPR-15516
      4d962a17
  22. 05 4月, 2017 1 次提交
    • S
      Return 5xx HTTP status for invalid target types with Jackson · ed856589
      Sebastien Deleuze 提交于
      InvalidDefinitionException has been introduced in Jackson 2.9 to be
      able to differentiate invalid data sent from the client (should still
      generate a 4xx HTTP status code) from server side errors like beans with
      no default constructor (should generate a 5xx HTTP status code).
      
      Issue: SPR-14925
      ed856589
  23. 28 10月, 2016 1 次提交
  24. 15 9月, 2016 1 次提交
    • R
      Improve async request timeout handling · 765b4724
      Rossen Stoyanchev 提交于
      Rather than setting the status to 503 directly from the timeout
      interceptor which no longer seems to work reliably with Servlet
      containers like Jetty even performing an additional ERROR dispatch back
      to the original URL, we know rather set the DeferredResult to an
      AsyncTimeoutException, which results in a dispatch and standard
      handling within Spring MVC. This should be a more reliable way of
      dealing with timeouts.
      
      Issue: SPR-14669
      765b4724
  25. 05 7月, 2016 1 次提交
  26. 07 4月, 2016 1 次提交
  27. 28 7月, 2015 1 次提交
  28. 16 6月, 2015 1 次提交
    • R
      Missing path variable is now a 500 error · 4b05bda0
      Rossen Stoyanchev 提交于
      Before this change a missing path variable value resulted in a 400
      error where in fact the error is due to a mismatch between the
      declared @PathVariable and the URI template, i.e. a 500 error.
      
      This change introduced a MissingPathVariableException as a sub-class
      of ServletRequestBindingException (the exception previously thrown)
      and results in a response status code of 500 by default.
      
      Issue: SPR-13121
      4b05bda0
  29. 21 10月, 2014 1 次提交
  30. 26 9月, 2013 1 次提交
    • B
      Add NoHandlerFoundException to DispatcherServlet · 62d6a43c
      Brian Clozel 提交于
      Prior to this commit, the DispatcherServlet would send an error
      response using the HttpServlet API when no Handler was found to
      handle this request.
      
      Now the DispatcherServlet can be configured to throw a
      NoHandlerFoundException, when the throwExceptionIfNoHandlerFound
      property is set to "true".
      Those exceptions can be later on caught by default or custom
      HandlerExceptionResolvers/ExceptionHandlers.
      
      Issue: SPR-10481
      62d6a43c
  31. 29 12月, 2012 1 次提交
  32. 12 12月, 2012 1 次提交
    • C
      Eliminate all Javadoc warnings · f2653470
      Chris Beams 提交于
       - Support external Javadoc links using Gradle's javadoc.options.links
      
       - Fix all other Javadoc warnings, such as typos, references to
         non-existent (or no longer existent) types and members, etc,
         including changes related to the Quartz 2.0 upgrade (SPR-8275) and
         adding the HTTP PATCH method (SPR-7985).
      
       - Suppress all output for project-level `javadoc` tasks in order to
         hide false-negative warnings about cross-module @see and @link
         references (e.g. spring-core having a @see reference to spring-web).
         Use the `--info` (-i) flag to gradle at any time to see project-level
         javadoc warnings without running the entire `api` task. e.g.
         `gradle :spring-core:javadoc -i`
      
       - Favor root project level `api` task for detection of legitimate
         Javadoc warnings. There are now zero Javadoc warnings across the
         entirety of spring-framework. Goal: keep it that way.
      
       - Remove all @link and @see references to types and members that exist
         only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+
         respectively. This is necessary because only one version of each of
         these dependencies can be present on the global `api` javadoc task's
         classpath. To that end, the `api` task classpath has now been
         customized to ensure that the Servlet 3 API and Hibernate Core 4 jars
         have precedence.
      
       - SPR-8896 replaced our dependency on aspectjrt with a dependency on
         aspectjweaver, which is fine from a POM point of view, but causes
         a spurious warning to be emitted from the ant iajc task that it
         "cannot find aspectjrt on the classpath" - even though aspectjweaver
         is perfectly sufficient. In the name of keeping the console quiet, a
         new `rt` configuration has been added, and aspectjrt added as a
         dependency to it. In turn, configurations.rt.asPath is appended to
         the iajc classpath during both compileJava and compileTestJava for
         spring-aspects.
      
      Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
      f2653470
  33. 11 9月, 2012 1 次提交
    • R
      Add error request attribute for 500 reponses · 48b963aa
      Rossen Stoyanchev 提交于
      DefaultHandlerExceptionResolver and ResponseEntityExceptionHandler now
      both set the "javax.servlet.error.exception" request attribute to the
      raised exception, allowing custom error pages configured via web.xml.
      
      Issue: SPR-9653
      48b963aa
  34. 28 8月, 2012 1 次提交
    • R
      Polish standard Spring MVC exception handling · da05b094
      Rossen Stoyanchev 提交于
      Rename ExceptionHandlerSupport to ResponseEntityExceptionHandler and
      emphasize the contrast to DefaultHandlerExceptionResovler -- i.e.
      one returns a ResponseEntity and relies on message converters while
      the other returns a ModelAndView and relies on view resolution.
      
      Issue: SPR-9290
      da05b094
  35. 22 8月, 2012 1 次提交
  36. 21 8月, 2012 1 次提交
    • R
      Add ExceptionHandlerSupport class · 1cf4a2fa
      Rossen Stoyanchev 提交于
      The new class is functionally equivalent to the
      DefaultHandlerExceptionResolver (i.e. it translates Spring MVC
      exceptions to various status codes) but uses an @ExceptionHandler
      returning a ResponseEntity<Object>, which means it can be customized to
      write error content to the body of the response.
      
      Issue: SPR-9290
      1cf4a2fa
  37. 11 7月, 2012 1 次提交
    • R
      Add BindException to DefaultHandlerExceptionResolver · a1b7a314
      Rossen Stoyanchev 提交于
      Previously DefaultHandlerExceptionResolver did not handle BindException
      but after this change it does. A BindException is raised when an
      @ModelAttribute annotated argument is not followed by a BindingResult
      argument. Hence this is unlikely to affect browser rendering.
      For programmatic clients however this change ensures an unhandled
      BindException is at least turned into a 400 error.
      
      Issue: SPR-9310
      a1b7a314