summer-java-template-service/src/main/java/com/github/jifengnan/template/service/TemplateServiceExceptionHandler.java
@ResponseBody
    @ExceptionHandler(AsyncRequestTimeoutException.class)
    public TemplateHttpResult handleTimeoutException(Exception e, HttpServletRequest request) {
        log.error(e.getMessage(), e);
        return TemplateHttpResult.createForFailure(HttpStatus.SERVICE_UNAVAILABLE.value(),
                "Time out. error message: " + e.getMessage(),
                request.getServletPath());
    }
/**
     * Handle the timeout exception
     *
     * @param e       the exception
     * @param request current HTTP request
     * @return a standard HTTP result
     */
Handle the timeout exception
@param e       the exception
@param request current HTTP request
@return a standard HTTP result
Handle the timeout exception @param e the exception @param request current HTTP request @return a standard HTTP result
@ResponseBody
    @ExceptionHandler(AsyncRequestTimeoutException.class)
    public TemplateHttpResult handleTimeoutException(Exception e, HttpServletRequest request) {
        log.error(e.getMessage(), e);
        return TemplateHttpResult.createForFailure(HttpStatus.SERVICE_UNAVAILABLE.value(),
                "Time out. error message: " + e.getMessage(),
                request.getServletPath());
    }
@ ResponseBody @ ExceptionHandler ( AsyncRequestTimeoutException . class ) public TemplateHttpResult handleTimeoutException ( Exception e , HttpServletRequest request ) { log . error ( e . getMessage ( ) , e ) ; return TemplateHttpResult . createForFailure ( HttpStatus . SERVICE_UNAVAILABLE . value ( ) , "Time out. error message: " + e . getMessage ( ) , request . getServletPath ( ) ) ; }
Handle the timeout exception
 @param e       the exception
 @param request current HTTP request
 @return a standard HTTP result
Handle the timeout exception @param e the exception @param request current HTTP request @return a standard HTTP result