优化提示
This commit is contained in:
parent
54c42132a7
commit
b15d2dec57
|
|
@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.ResponseStatus;
|
||||||
public class GlobalExceptionHandler {
|
public class GlobalExceptionHandler {
|
||||||
|
|
||||||
@ExceptionHandler(RuntimeException.class)
|
@ExceptionHandler(RuntimeException.class)
|
||||||
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
@ResponseStatus(HttpStatus.OK)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ElectromagneticResult<?> runTimeError(Throwable e) {
|
public ElectromagneticResult<?> runTimeError(Throwable e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
|
|
@ -23,7 +23,7 @@ public class GlobalExceptionHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExceptionHandler(BizException.class)
|
@ExceptionHandler(BizException.class)
|
||||||
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
@ResponseStatus(HttpStatus.OK)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ElectromagneticResult<?> bizError(BizException e) {
|
public ElectromagneticResult<?> bizError(BizException e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue