Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cash-loan-flow-boss
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡慧
cash-loan-flow-boss
Commits
343653b9
Commit
343653b9
authored
Aug 06, 2019
by
xiaozhe.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改异常信息捕获返回的message
parent
a9a40947
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
ApplicationExceptionConfiguration.java
...core/configuration/ApplicationExceptionConfiguration.java
+6
-1
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/core/configuration/ApplicationExceptionConfiguration.java
View file @
343653b9
...
@@ -6,6 +6,7 @@ import cn.quantgroup.cashloanflowboss.core.dictionary.ApplicationStatus;
...
@@ -6,6 +6,7 @@ import cn.quantgroup.cashloanflowboss.core.dictionary.ApplicationStatus;
import
cn.quantgroup.cashloanflowboss.core.exception.ApplicationException
;
import
cn.quantgroup.cashloanflowboss.core.exception.ApplicationException
;
import
com.fasterxml.jackson.core.io.JsonEOFException
;
import
com.fasterxml.jackson.core.io.JsonEOFException
;
import
com.fasterxml.jackson.databind.JsonMappingException
;
import
com.fasterxml.jackson.databind.JsonMappingException
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.http.converter.HttpMessageNotReadableException
;
import
org.springframework.http.converter.HttpMessageNotReadableException
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
...
@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
* <p>
* <p>
* Created by WeiWei on 2017/5/2.
* Created by WeiWei on 2017/5/2.
*/
*/
@Slf4j
@Order
(
1
)
@Order
(
1
)
@Component
@Component
@RestControllerAdvice
@RestControllerAdvice
...
@@ -102,7 +104,10 @@ public class ApplicationExceptionConfiguration {
...
@@ -102,7 +104,10 @@ public class ApplicationExceptionConfiguration {
}
}
}
}
return
new
Result
<>(
ApplicationStatus
.
INTERNAL_SERVICE_ERROR
,
ApplicationException
.
class
.
isAssignableFrom
(
e
.
getClass
())
?
cause
.
getMessage
()
:
e
.
getMessage
());
String
errorMessage
=
ApplicationException
.
class
.
isAssignableFrom
(
e
.
getClass
())
?
cause
.
getMessage
()
:
e
.
getMessage
();
log
.
error
(
"程序员开小差了,异常信息:{}"
,
errorMessage
);
return
new
Result
<>(
ApplicationStatus
.
INTERNAL_SERVICE_ERROR
,
ApplicationStatus
.
INTERNAL_SERVICE_ERROR
.
getMessage
());
}
}
...
...
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