mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 12:13:24 +09:00
change 3 path
This commit is contained in:
@@ -91,8 +91,14 @@ public class ExcelDownlodeUtils {
|
||||
//확장자는 .xlsx로 해주세요.
|
||||
//매개변수는 HttpServletResponse response와 파일명 String을 넣으면 되고 파일명은 한글도 가능합니다.
|
||||
public void downlodeExcelForm(HttpServletResponse response, String formName) throws IOException {
|
||||
String excelfilesDirectory = "src/main/webapp/excelfiles/excelform/";
|
||||
//String excelfilesDirectory = "D:/excel/form/";
|
||||
String excelfilesDirectory = "/excel/form/";
|
||||
|
||||
File saveFolder = new File(EgovWebUtil.filePathBlackList(excelfilesDirectory));
|
||||
|
||||
if (!saveFolder.exists() || saveFolder.isFile()) {
|
||||
saveFolder.mkdirs();
|
||||
}
|
||||
|
||||
File file = new File(excelfilesDirectory+formName);
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@ public class ExcelRequestManager {
|
||||
String storePathString = "";
|
||||
String atchFileIdString = "";
|
||||
|
||||
String folder = request.getServletContext().getRealPath("/");
|
||||
// String folder = "D:/excel";
|
||||
String folder = "/excel";
|
||||
|
||||
if ("".equals(storePath) || storePath == null) {
|
||||
storePathString = folder+"/excelfiles/upload/";
|
||||
|
||||
@@ -20,19 +20,12 @@ public class ImgService {
|
||||
|
||||
String storePathString = "";
|
||||
try {
|
||||
//대안1
|
||||
|
||||
//InputStream resource = getClass().getResourceAsStream("/static/img/mypage/profile");
|
||||
//ClassPathResource resource = new ClassPathResource("/static/img/mypage/profile");
|
||||
//storePathString = "D:/static/img/mypage/profile";
|
||||
storePathString = "/static/img/mypage/profile";
|
||||
//resource.getFile().getAbsolutePath();
|
||||
|
||||
|
||||
//대안2
|
||||
|
||||
//InputStream resource = getClass().getClassLoader().getResourceAsStream("static/img/mypage/profile");
|
||||
|
||||
//기존
|
||||
ClassPathResource resource = new ClassPathResource("/static/img/mypage/profile");
|
||||
storePathString = resource.getFile().getAbsolutePath();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user