@ConditionalOnProperty(value="globalExceptionHandler.enabled",
havingValue="true",
matchIfMissing=false)
@RestController
@ControllerAdvice
public class GlobalExceptionHandler
extends Object
| 构造器和说明 |
|---|
GlobalExceptionHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
JsonResponse |
baseExceptionHandler(javax.servlet.http.HttpServletRequest req,
Exception e)
Base exception handler
|
JsonResponse |
defaultExceptionHandler(javax.servlet.http.HttpServletRequest req,
Exception e)
Default exception handler
|
@ExceptionHandler(value=top.lshaci.framework.common.exception.BaseException.class) public JsonResponse baseExceptionHandler(javax.servlet.http.HttpServletRequest req, Exception e)
req - the http servlet requeste - the exception@ExceptionHandler(value=java.lang.Exception.class) public JsonResponse defaultExceptionHandler(javax.servlet.http.HttpServletRequest req, Exception e)
req - the http servlet requeste - the exceptionCopyright © 2018. All rights reserved.