Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
chejia-smart-service
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 65fcea86
authored
May 04, 2021
by
fz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.异常捕获处理
1 parent
d0ef2ed0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
src/main/java/com/glsx/smart/exception/GlobalExceptionHandler.java
src/main/java/com/glsx/smart/exception/GlobalExceptionHandler.java
View file @
65fcea8
...
@@ -6,6 +6,7 @@ import org.springframework.validation.BindException;
...
@@ -6,6 +6,7 @@ import org.springframework.validation.BindException;
import
org.springframework.web.bind.MethodArgumentNotValidException
;
import
org.springframework.web.bind.MethodArgumentNotValidException
;
import
org.springframework.web.bind.ServletRequestBindingException
;
import
org.springframework.web.bind.ServletRequestBindingException
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
/**
/**
* <p>Description:
* <p>Description:
...
@@ -16,7 +17,7 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
...
@@ -16,7 +17,7 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
* @deprecated 抛出异常,让上游服务捕获信息
* @deprecated 抛出异常,让上游服务捕获信息
*/
*/
@Slf4j
@Slf4j
//
@RestControllerAdvice
@RestControllerAdvice
@Deprecated
@Deprecated
public
class
GlobalExceptionHandler
{
public
class
GlobalExceptionHandler
{
@ExceptionHandler
({
BusinessException
.
class
})
@ExceptionHandler
({
BusinessException
.
class
})
...
...
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