Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
schbrain-parent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
panwangnan
schbrain-parent
Commits
7d30e603
Commit
7d30e603
authored
May 31, 2023
by
liaozan
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine dubbo exception message
parent
71348641
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/filter/DubboExceptionFilter.java
...work/autoconfigure/dubbo/filter/DubboExceptionFilter.java
+4
-3
starters/mybatis-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/mybatis/biz/BizIdHelper.java
...rain/framework/autoconfigure/mybatis/biz/BizIdHelper.java
+1
-1
No files found.
starters/dubbo-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/dubbo/filter/DubboExceptionFilter.java
View file @
7d30e603
...
@@ -37,13 +37,14 @@ public class DubboExceptionFilter extends ExceptionFilter {
...
@@ -37,13 +37,14 @@ public class DubboExceptionFilter extends ExceptionFilter {
}
}
private
void
logErrorDetail
(
Invoker
<?>
invoker
,
Throwable
exception
)
{
private
void
logErrorDetail
(
Invoker
<?>
invoker
,
Throwable
exception
)
{
RpcServiceContext
context
=
RpcContext
.
getServiceContext
();
RpcServiceContext
context
=
RpcContext
.
get
Current
ServiceContext
();
String
arguments
=
Arrays
.
toString
(
context
.
getArguments
());
String
arguments
=
Arrays
.
toString
(
context
.
getArguments
());
String
serviceName
=
invoker
.
getInterface
().
getSimpleName
();
String
serviceName
=
invoker
.
getInterface
().
getSimpleName
();
String
methodName
=
context
.
getMethodName
();
String
methodName
=
context
.
getMethodName
();
String
remoteHost
=
context
.
getRemoteHost
();
String
remoteHost
=
context
.
getRemoteHost
();
String
remoteApplication
=
context
.
getRemoteApplicationName
();
String
remoteApplication
=
context
.
getRemoteApplicationName
();
log
.
error
(
"Catch rpc exception, client: {}@{}, target: {}#{}, args: {}"
,
remoteApplication
,
remoteHost
,
serviceName
,
methodName
,
arguments
,
exception
);
String
errorMessage
=
ExceptionUtil
.
getMessage
(
exception
);
log
.
error
(
"Catch rpc exception: {}, client: {}@{}, target: {}#{}, args: {}"
,
errorMessage
,
remoteApplication
,
remoteHost
,
serviceName
,
methodName
,
arguments
,
exception
);
}
}
}
}
\ No newline at end of file
starters/mybatis-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/mybatis/biz/BizIdHelper.java
View file @
7d30e603
...
@@ -44,7 +44,7 @@ public class BizIdHelper {
...
@@ -44,7 +44,7 @@ public class BizIdHelper {
private
static
TableFieldInfo
getBizIdFieldInfo
(
TableInfo
tableInfo
,
Field
bizIdField
)
{
private
static
TableFieldInfo
getBizIdFieldInfo
(
TableInfo
tableInfo
,
Field
bizIdField
)
{
List
<
TableFieldInfo
>
fieldInfoList
=
tableInfo
.
getFieldList
().
stream
()
List
<
TableFieldInfo
>
fieldInfoList
=
tableInfo
.
getFieldList
().
stream
()
.
filter
(
fieldInfo
->
fieldInfo
.
getField
()
==
bizIdField
)
.
filter
(
fieldInfo
->
fieldInfo
.
getField
()
.
equals
(
bizIdField
)
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
fieldInfoList
))
{
if
(
CollectionUtils
.
isEmpty
(
fieldInfoList
))
{
throw
new
BaseException
(
String
.
format
(
"%s can not be found in fieldList"
,
bizIdField
.
getName
()));
throw
new
BaseException
(
String
.
format
(
"%s can not be found in fieldList"
,
bizIdField
.
getName
()));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment