mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-06-26 04:27:48 +08:00
增加对文件上传大小超限的异常处理
This commit is contained in:
parent
2877bde26a
commit
41fd16e5d3
@ -41,7 +41,7 @@ public class GlobalExceptionHandler {
|
|||||||
@ExceptionHandler(MaxUploadSizeExceededException.class)
|
@ExceptionHandler(MaxUploadSizeExceededException.class)
|
||||||
@ResponseStatus(HttpStatus.FORBIDDEN)
|
@ResponseStatus(HttpStatus.FORBIDDEN)
|
||||||
public WVPResult<String> exceptionHandler(MaxUploadSizeExceededException e) {
|
public WVPResult<String> exceptionHandler(MaxUploadSizeExceededException e) {
|
||||||
return WVPResult.fail(ErrorCode.ERROR403);
|
return WVPResult.fail(ErrorCode.ERROR403.getCode(), "文件过大");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user