common:添加 IllegalArgumentException 异常处理逻辑

dev_2.0.0
xueqingkun
parent 70b6f60cb2
commit 822af5cec0

@ -105,6 +105,17 @@ public class ResponseConfig implements ResponseBodyAdvice<Object> {
}
/**
*
* @param exception
* @return
*/
@ExceptionHandler(IllegalArgumentException.class)
public GlobalResult<?> manualValidationExceptionResponse(IllegalArgumentException exception) {
log.error(exception.getMessage(), exception);
return GlobalResult.error(HttpStatus.INTERNAL_SERVER_ERROR.value(), exception.getMessage(), "参数验证异常");
}
/**
*
*

Loading…
Cancel
Save