From 05641a271eeab06b903710900184a92ca5092e2e Mon Sep 17 00:00:00 2001 From: thinkgem Date: Sun, 21 Apr 2024 19:53:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E7=AB=AF=E9=AA=8C=E8=AF=81=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/core/src/main/resources/views/error/400.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/core/src/main/resources/views/error/400.html b/modules/core/src/main/resources/views/error/400.html index 0e16eee1..321af2e7 100644 --- a/modules/core/src/main/resources/views/error/400.html +++ b/modules/core/src/main/resources/views/error/400.html @@ -9,7 +9,8 @@ if (isBlank(message)){ if (ex != null){ if(@StringUtils.startsWith(@ex.getMessage(), 'msg:')){ message = @StringUtils.replace(@ex.getMessage(), 'msg:', ''); - }else if (type.fullName(ex) == 'org.springframework.validation.BindException'){ + }else if (type.fullName(ex) == 'org.springframework.validation.BindException' + || type.fullName(ex) == 'org.springframework.web.bind.MethodArgumentNotValidException'){ for (var e in ex.globalErrors){ message = message + '☆ ' + text(e.defaultMessage) + ' (' + e.objectName + ')
'; }