|
|
|
@ -1,6 +1,10 @@
|
|
|
|
|
package cokr.xit.fims.base;
|
|
|
|
|
|
|
|
|
|
import java.io.BufferedReader;
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.io.FileInputStream;
|
|
|
|
|
import java.io.InputStreamReader;
|
|
|
|
|
import java.nio.charset.Charset;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
@ -141,4 +145,33 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
|
|
|
|
|
mav.addObject("saved", saved);
|
|
|
|
|
return mav;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(name="최고관리자 서버 파일 내용 보기", value="/superUser/getFileText.do")
|
|
|
|
|
public ModelAndView getFileText(@RequestParam(value="directories[]") String... directories) throws Exception {
|
|
|
|
|
String fileCn = "";
|
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
|
|
|
|
|
|
String path = String.join(File.separator, directories);
|
|
|
|
|
|
|
|
|
|
int inputData = 0;
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(path),Charset.forName("EUC-KR")));
|
|
|
|
|
|
|
|
|
|
while ((inputData = br.read()) != -1) {
|
|
|
|
|
sb.append((char)inputData) ;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fileCn = sb.toString();
|
|
|
|
|
|
|
|
|
|
br.close();
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
|
|
mav.setViewName("jsonView");
|
|
|
|
|
mav.addObject("fileCn", fileCn);
|
|
|
|
|
return mav;
|
|
|
|
|
}
|
|
|
|
|
}
|