Class ResponseStatusExceptionHandler

  • java.lang.Object
    • org.springframework.web.server.handler.ResponseStatusExceptionHandler
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      protected HttpStatus determineStatus(java.lang.Throwable ex)
      Determine the HTTP status implied by the given exception.
      reactor.core.publisher.Mono<java.lang.Void> handle(ServerWebExchange exchange, java.lang.Throwable ex)
      Handle the given exception.
      void setWarnLogCategory(java.lang.String loggerName)
      Set the log category for warn logging.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResponseStatusExceptionHandler

        public ResponseStatusExceptionHandler()
    • Method Detail

      • setWarnLogCategory

        public void setWarnLogCategory(java.lang.String loggerName)
        Set the log category for warn logging.

        Default is no warn logging. Specify this setting to activate warn logging into a specific category.

        See Also:
        LogFactory.getLog(String), Logger.getLogger(String)
      • handle

        public reactor.core.publisher.Mono<java.lang.Void> handle(ServerWebExchange exchange,
                                                                  java.lang.Throwable ex)
        Description copied from interface: WebExceptionHandler
        Handle the given exception. A completion signal through the return value indicates error handling is complete while an error signal indicates the exception is still not handled.
        Specified by:
        handle in interface WebExceptionHandler
        exchange - the current exchange
        ex - the exception to handle
        Mono<Void> to indicate when exception handling is complete
      • determineStatus

        protected HttpStatus determineStatus(java.lang.Throwable ex)
        Determine the HTTP status implied by the given exception.
        ex - the exception to introspect
        the associated HTTP status, if any