Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4bba20ee
authored
Apr 27, 2026
by
杨卫
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:捕获到jsr303校验异常,去掉参数校验错误字样
1 parent
fd3f2935
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
aus-vr/src/main/java/com/glsx/usedcar/advice/GlobalExceptionHandler.java
aus-vr/src/main/java/com/glsx/usedcar/advice/GlobalExceptionHandler.java
View file @
4bba20e
...
@@ -42,7 +42,7 @@ public class GlobalExceptionHandler {
...
@@ -42,7 +42,7 @@ public class GlobalExceptionHandler {
String
errorMsg
=
e
.
getBindingResult
().
getFieldErrors
().
stream
()
String
errorMsg
=
e
.
getBindingResult
().
getFieldErrors
().
stream
()
.
map
(
DefaultMessageSourceResolvable:
:
getDefaultMessage
)
.
map
(
DefaultMessageSourceResolvable:
:
getDefaultMessage
)
.
collect
(
Collectors
.
joining
(
","
));
.
collect
(
Collectors
.
joining
(
","
));
return
BaseResp
.
fail
(
"参数错误:"
+
errorMsg
);
return
BaseResp
.
fail
(
errorMsg
);
}
}
// 捕获所有未指定的异常(兜底)
// 捕获所有未指定的异常(兜底)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment