Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
shop-Mall
Project
Project
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
licc
shop-Mall
Commits
7dea81ee
Commit
7dea81ee
authored
Mar 05, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
d0164007
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
UploadServiceImpl.java
...java/cn/wisenergy/service/app/impl/UploadServiceImpl.java
+8
-7
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UploadServiceImpl.java
View file @
7dea81ee
...
...
@@ -4,6 +4,7 @@ import cn.wisenergy.common.utils.FileException;
import
cn.wisenergy.common.utils.FileUtils
;
import
cn.wisenergy.common.utils.FrameGrabberKit
;
import
cn.wisenergy.common.utils.StringUtil
;
import
cn.wisenergy.model.app.Page
;
import
cn.wisenergy.model.app.shopZx
;
import
com.alibaba.fastjson.JSON
;
...
...
@@ -270,14 +271,14 @@ public class UploadServiceImpl implements UploadService {
private
Path
fileStorageLocation
;
// 文件在本地存储的地址
public
UploadServiceImpl
(
@Value
(
"${file.upload.path:#{null}}"
)
String
path
)
{
this
.
fileStorageLocation
=
Paths
.
get
(
path
).
toAbsolutePath
().
normalize
();
try
{
Files
.
createDirectories
(
this
.
fileStorageLocation
);
}
catch
(
IOException
e
)
{
throw
new
FileException
(
"Could not create the directory"
,
e
);
if
(!
StringUtil
.
isBlank
(
path
))
{
this
.
fileStorageLocation
=
Paths
.
get
(
path
).
toAbsolutePath
().
normalize
();
try
{
Files
.
createDirectories
(
this
.
fileStorageLocation
);
}
catch
(
IOException
e
)
{
throw
new
FileException
(
"Could not create the directory"
,
e
);
}
}
}
/**
...
...
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