|
@@ -90,6 +90,7 @@ public class CommonException {
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@ResponseStatus(value = HttpStatus.METHOD_NOT_ALLOWED)
|
|
@ResponseStatus(value = HttpStatus.METHOD_NOT_ALLOWED)
|
|
public Object notFondMethod(Exception ex) {
|
|
public Object notFondMethod(Exception ex) {
|
|
|
|
+ logger.info(" 全局notFondMethod异常捕获 .." + ex.getMessage());
|
|
// 将匹配不到方法的异常状态定位404。
|
|
// 将匹配不到方法的异常状态定位404。
|
|
Info info = getInfo(defaultNotFoundError, "not fond");
|
|
Info info = getInfo(defaultNotFoundError, "not fond");
|
|
return info;
|
|
return info;
|
|
@@ -99,6 +100,7 @@ public class CommonException {
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@ResponseStatus(value = HttpStatus.NOT_FOUND)
|
|
@ResponseStatus(value = HttpStatus.NOT_FOUND)
|
|
public Object notReadable(Exception ex) {
|
|
public Object notReadable(Exception ex) {
|
|
|
|
+ logger.info(" 全局notFondMethod异常捕获 .." + ex.getMessage());
|
|
// 将参数有异常的数据拦截返回
|
|
// 将参数有异常的数据拦截返回
|
|
Info info = getInfo(defaultNotFoundError, "请检查请求数据..");
|
|
Info info = getInfo(defaultNotFoundError, "请检查请求数据..");
|
|
return info;
|
|
return info;
|