修改msg 信息统一处理
This commit is contained in:
@@ -147,7 +147,7 @@ public class DefaultExceptionAdvice {
|
|||||||
@ExceptionHandler(MsgException.class)
|
@ExceptionHandler(MsgException.class)
|
||||||
public ResponseEntity handleException(MsgException e) {
|
public ResponseEntity handleException(MsgException e) {
|
||||||
LOGGER.error("业务异常", e);
|
LOGGER.error("业务异常", e);
|
||||||
Result response = Result.failure(DefaultError.BUSINESS_ERROR);
|
Result response = Result.fail(e.getMessage());
|
||||||
response.setMsg(e.getMessage());
|
response.setMsg(e.getMessage());
|
||||||
return new ResponseEntity<>(response, HttpStatus.OK);
|
return new ResponseEntity<>(response, HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user