Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
szpt
Project overview
Project overview
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
以墨为白
szpt
Commits
8a2e1b61
Commit
8a2e1b61
authored
Dec 30, 2024
by
以墨为白
🎧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片上传-bug优化
parent
e3ee1ff4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
src/main/java/com/zksy/szpt/exception/NotificationException.java
...n/java/com/zksy/szpt/exception/NotificationException.java
+2
-1
src/main/java/com/zksy/szpt/service/ImageUploadService.java
src/main/java/com/zksy/szpt/service/ImageUploadService.java
+1
-1
No files found.
src/main/java/com/zksy/szpt/exception/NotificationException.java
View file @
8a2e1b61
...
...
@@ -5,11 +5,12 @@ package com.zksy.szpt.exception;
*/
public
class
NotificationException
extends
Exception
{
//异常信息
private
String
message
;
private
final
String
message
;
//构造函数
public
NotificationException
(
String
message
)
{
super
(
message
);
this
.
message
=
message
;
this
.
initCause
(
new
Throwable
(
message
));
//设置cause,方便获取异常信息
}
}
src/main/java/com/zksy/szpt/service/ImageUploadService.java
View file @
8a2e1b61
...
...
@@ -70,7 +70,7 @@ public class ImageUploadService {
xxImgfile
.
setData
(
fileContent
);
return
xxImgfileMapper
.
insert
(
xxImgfile
);
}
catch
(
Exception
e
)
{
throw
new
NotificationException
(
e
.
getCause
().
getMessage
());
throw
new
NotificationException
(
e
.
getCause
()
==
null
?
e
.
getMessage
()
:
e
.
getCause
()
.
getMessage
());
}
// 将文件内容插入数据库
// fileContentMono.flatMap(fileContent -> {
...
...
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