Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-cost-system
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
bltdc
dc-cost-system
Commits
5c4c7677
Commit
5c4c7677
authored
Jan 08, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
68345dd2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
pom.xml
bailuntec-cost-core/pom.xml
+0
-1
GlobalExceptionHandler.java
...om/blt/other/common/exception/GlobalExceptionHandler.java
+2
-1
No files found.
bailuntec-cost-core/pom.xml
View file @
5c4c7677
...
@@ -181,7 +181,6 @@
...
@@ -181,7 +181,6 @@
<dependency>
<dependency>
<groupId>
mysql
</groupId>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<artifactId>
mysql-connector-java
</artifactId>
<scope>
runtime
</scope>
</dependency>
</dependency>
...
...
bailuntec-cost-core/src/main/java/com/blt/other/common/exception/GlobalExceptionHandler.java
View file @
5c4c7677
...
@@ -4,6 +4,7 @@ package com.blt.other.common.exception;
...
@@ -4,6 +4,7 @@ package com.blt.other.common.exception;
import
com.bailuntec.common.JsonUtilByJackson
;
import
com.bailuntec.common.JsonUtilByJackson
;
import
com.blt.other.common.interceptor.mail.MailService
;
import
com.blt.other.common.interceptor.mail.MailService
;
import
com.blt.other.common.wrapper.RequestBakRequestWrapper
;
import
com.blt.other.common.wrapper.RequestBakRequestWrapper
;
import
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException
;
import
lombok.Builder
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -75,7 +76,7 @@ public class GlobalExceptionHandler {
...
@@ -75,7 +76,7 @@ public class GlobalExceptionHandler {
* 数据库唯一键冲突异常
* 数据库唯一键冲突异常
*/
*/
@ResponseBody
@ResponseBody
@ExceptionHandler
({
SQLIntegrityConstraintViolationException
.
class
})
@ExceptionHandler
({
SQLIntegrityConstraintViolationException
.
class
,
MySQLIntegrityConstraintViolationException
.
class
})
public
Map
<
String
,
Object
>
handleSQLIntegrityConstraintViolationException
(
HttpServletRequest
request
,
public
Map
<
String
,
Object
>
handleSQLIntegrityConstraintViolationException
(
HttpServletRequest
request
,
RuntimeException
e
)
{
RuntimeException
e
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
...
...
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