| | |
| | | { |
| | | private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class); |
| | | |
| | | @Value("${spring.servlet.multipart.max-file-size:4MB}") |
| | | private String maxFileSize; |
| | | @Value("${spring.servlet.multipart.max-request-size:100MB}") |
| | | private String maxRequestSize; |
| | | |
| | | |
| | | /** |
| | |
| | | @ExceptionHandler(MaxUploadSizeExceededException.class) |
| | | public AjaxResult fileUpLoad(MaxUploadSizeExceededException e) { |
| | | log.error("上传文件异常 => : {}", e.getMessage()); |
| | | return AjaxResult.error("文件识别大小超出限制,允许的大小在" + maxFileSize); |
| | | return AjaxResult.error("文件识别大小超出限制,允许的大小在" + "500MB"); |
| | | } |
| | | } |