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