mirror of https://gitee.com/maxjhandsome/pig
🐛 Fixing a bug. closed #I1KGX4 全局异常处理 Exception 包装返回异常问题
This commit is contained in:
parent
6868be2418
commit
9cbdaceed3
|
@ -49,7 +49,7 @@ public class GlobalExceptionHandlerResolver {
|
||||||
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||||
public R exception(Exception e) {
|
public R exception(Exception e) {
|
||||||
log.error("全局异常信息 ex={}", e.getMessage(), e);
|
log.error("全局异常信息 ex={}", e.getMessage(), e);
|
||||||
return R.failed(e);
|
return R.failed(e.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue