File file = new File(this.getClass().getResource("").getPath());
System.out.println(file.getPath());
String path=file.getPath();
//path=path.substring(0,path.indexOf("WEB-INF"))+"upload\\Excel"+"\\"+"import.txt"; //服务器专用
path=path.substring(0,path.indexOf("target"))+"src\\main\\webapp\\upload\\Excel"+"\\"+"import.txt";
String info=(sqlserver.readFile(path));
info=info.replaceAll("\r|\n", "");
info=info.substring(0,info.length()-1);
String info1[]=info.split("-");
String ip=DesUtil.decrypt(info1[0]);
String databaseName=DesUtil.decrypt(info1[1]);
String usename=DesUtil.decrypt(info1[2]);
String password=DesUtil.decrypt(info1[3]);
 posted on 2019-07-03 16:19  技术的深奥  阅读(348)  评论(0编辑  收藏  举报