Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
elearn
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
elearn
Commits
b42d9947
Commit
b42d9947
authored
Dec 20, 2024
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MinioTools优化
parent
dba01cd2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
cloud-core/src/main/java/com/yizhi/core/application/file/util/MinioTools.java
+2
-4
No files found.
cloud-core/src/main/java/com/yizhi/core/application/file/util/MinioTools.java
View file @
b42d9947
...
...
@@ -10,7 +10,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
sun.misc.BASE
64Encoder
;
import
cn.hutool.core.codec.Base
64Encoder
;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayOutputStream
;
...
...
@@ -173,10 +173,8 @@ public class MinioTools {
output
.
write
(
buff
,
0
,
n
);
}
b
=
output
.
toByteArray
();
// 对字节数组Base64编码
BASE64Encoder
encoder
=
new
BASE64Encoder
();
// 返回 Base64 编码过的字节数组字符串
return
e
ncoder
.
encode
(
b
);
return
Base64E
ncoder
.
encode
(
b
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"获取文件失败"
,
JSONObject
.
toJSONString
(
e
));
throw
new
BizException
(
ReturnCode
.
BIZ_FAIL
.
getCode
(),
"获取文件失败"
);
...
...
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