|
|
@@ -51,7 +51,11 @@ public class GlobalExceptionHandler {
|
|
|
log.warn("接口异常 uri = {} e = {}", exchange.getRequest().getPath().value(), LogExceptionStackTrace.erroStackTrace(e));
|
|
|
return RW.fail(HttpStatus.FORBIDDEN.toString(), "没有权限,请联系管理员授权", Mono.just(e.getMessage()));
|
|
|
}
|
|
|
-
|
|
|
+ @ExceptionHandler(IllegalArgumentException.class)
|
|
|
+ public Mono<RW<Object>> handleIllegalArgumentException(ServerWebExchange exchange, IllegalArgumentException e) {
|
|
|
+ log.warn("接口异常 uri = {} e = {}", exchange.getRequest().getPath().value(), LogExceptionStackTrace.erroStackTrace(e));
|
|
|
+ return RW.fail(HttpStatus.FORBIDDEN.toString(), "请求参数异常", Mono.just(e.getMessage()));
|
|
|
+ }
|
|
|
//@ResponseStatus(HttpStatus.BAD_REQUEST)
|
|
|
@ExceptionHandler(MissingRequestValueException.class)
|
|
|
public Mono<RW<Object>> handleMissingRequestValueException(ServerWebExchange exchange, MissingRequestValueException e) {
|