Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jeecg-boot
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
chenjunxiong
jeecg-boot
Commits
b153669b
Commit
b153669b
authored
Feb 01, 2021
by
zhangdaiscott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片导出报错,本地upload情况下,ImageBasePath未设置
parent
449a7759
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/base/controller/JeecgController.java
+8
-1
No files found.
jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/base/controller/JeecgController.java
View file @
b153669b
...
...
@@ -15,6 +15,7 @@ import org.jeecgframework.poi.excel.entity.ExportParams;
import
org.jeecgframework.poi.excel.entity.ImportParams
;
import
org.jeecgframework.poi.excel.view.JeecgEntityExcelView
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
org.springframework.web.servlet.ModelAndView
;
...
...
@@ -38,6 +39,8 @@ public class JeecgController<T, S extends IService<T>> {
@Autowired
S
service
;
@Value
(
"${jeecg.path.upload}"
)
private
String
upLoadPath
;
/**
* 导出excel
*
...
...
@@ -65,7 +68,11 @@ public class JeecgController<T, S extends IService<T>> {
ModelAndView
mv
=
new
ModelAndView
(
new
JeecgEntityExcelView
());
mv
.
addObject
(
NormalExcelConstants
.
FILE_NAME
,
title
);
//此处设置的filename无效 ,前端会重更新设置一下
mv
.
addObject
(
NormalExcelConstants
.
CLASS
,
clazz
);
mv
.
addObject
(
NormalExcelConstants
.
PARAMS
,
new
ExportParams
(
title
+
"报表"
,
"导出人:"
+
sysUser
.
getRealname
(),
title
));
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
ExportParams
exportParams
=
new
ExportParams
(
title
+
"报表"
,
"导出人:"
+
sysUser
.
getRealname
(),
title
);
exportParams
.
setImageBasePath
(
upLoadPath
);
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
mv
.
addObject
(
NormalExcelConstants
.
PARAMS
,
exportParams
);
mv
.
addObject
(
NormalExcelConstants
.
DATA_LIST
,
exportList
);
return
mv
;
}
...
...
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