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