Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
gsc
/
gsc-vcp-web-facade
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 67ccd170
authored
Nov 24, 2025
by
张富康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
异常报错修改
1 parent
1425b9a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
src/main/java/com/gsc4cloud/gsc/facade/vpcweb/handler/GlobalExceptionHandler.java
src/main/java/com/gsc4cloud/gsc/facade/vpcweb/handler/GlobalExceptionHandler.java
View file @
67ccd17
...
...
@@ -55,7 +55,7 @@ public class GlobalExceptionHandler {
private
String
EXCEPTION_PUSH_URL
;
@Value
(
"${pushExceptionFlag: true}"
)
private
Boolean
pushExceptionFlag
;
@Value
(
"${excludeExceptions:}"
)
@Value
(
"${excludeExceptions:
org.springframework.web.servlet.resource.NoResourceFoundException
}"
)
private
List
<
String
>
excludeExceptionList
;
@Resource
private
Environment
environment
;
...
...
@@ -154,6 +154,7 @@ public class GlobalExceptionHandler {
String
typeName
=
e
.
getClass
().
getTypeName
();
// 可以在nacos进行配置哪些异常不发送信息 哪些异常发送信息
// 判断异常类型是否在list中
excludeExceptionList
.
add
(
"org.springframework.web.servlet.resource.NoResourceFoundException"
);
if
(
ObjectUtil
.
isNotEmpty
(
excludeExceptionList
)
&&
excludeExceptionList
.
contains
(
typeName
))
{
return
body
;
}
...
...
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