From 1312c1b20acf717525f327e2326f578386f1351d Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 9 Jul 2021 10:54:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7oshi=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=ACv5.7.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../framework/web/exception/GlobalExceptionHandler.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index be35360af..7279a36d1 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ 2.1.4 1.3.1 1.2.76 - 5.7.4 + 5.7.5 5.8.0 2.10.0 1.4 diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java index d268b143e..d9812d8a4 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java @@ -47,8 +47,9 @@ public class GlobalExceptionHandler /** * 请求方式不支持 */ - @ExceptionHandler({HttpRequestMethodNotSupportedException.class}) - public AjaxResult handleException(HttpRequestMethodNotSupportedException e, HttpServletRequest request) { + @ExceptionHandler({ HttpRequestMethodNotSupportedException.class }) + public AjaxResult handleException(HttpRequestMethodNotSupportedException e, HttpServletRequest request) + { String requestURI = request.getRequestURI(); String msg = String.format("访问的URL[%s]不支持%s请求", requestURI, e.getMethod()); log.error(msg, e); @@ -59,7 +60,8 @@ public class GlobalExceptionHandler * 拦截未知的运行时异常 */ @ExceptionHandler(RuntimeException.class) - public AjaxResult notFount(RuntimeException e, HttpServletRequest request) { + public AjaxResult notFount(RuntimeException e, HttpServletRequest request) + { String requestURI = request.getRequestURI(); String msg = String.format("访问的URL[%s]发生异常%s", requestURI, e.getMessage()); log.error(msg, e);