chore: 忽略静态资源的异常处理

This commit is contained in:
fit2-zhao 2024-08-12 14:47:17 +08:00 committed by Craftsman
parent 5034363060
commit 5843d13f6f
1 changed files with 4 additions and 1 deletions

View File

@ -123,7 +123,10 @@ public class RestControllerExceptionHandler {
@ExceptionHandler({EofException.class})
public ResponseEntity<Object> handleEofException(HttpServletRequest request, Exception e) {
String requestURI = request.getRequestURI();
if (StringUtils.startsWith(requestURI, "/assets") || StringUtils.startsWith(requestURI, "/fonts")) {
if (StringUtils.startsWith(requestURI, "/assets")
|| StringUtils.startsWith(requestURI, "/fonts")
|| StringUtils.startsWith(requestURI, "/images")
|| StringUtils.startsWith(requestURI, "/templates")) {
return ResponseEntity.internalServerError().body(null);
}
return ResponseEntity.internalServerError()