Commit aa5f329c by guojuxing

微盟批量导入同步门店模板

parent ec99c8e7
......@@ -42,9 +42,8 @@ public class WmStoreSyncController {
"attachment; filename=" + new String(fileName.getBytes("gbk"), "ISO-8859-1"));
fo = response.getOutputStream();
String rootPath = request.getSession().getServletContext().getRealPath("/");
String filePath = "/exceltemplate/wm_store_import_template.xls";
in = new FileInputStream(new File(rootPath + filePath));
String filePath = ClassLoader.getSystemResource("exceltemplate/wm_store_import_template.xls").getPath();
in = new FileInputStream(new File(filePath));
byte[] b = new byte[1024];
int len = 0;
while ((len = in.read(b)) != -1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment