master
duhui 2021-09-22 17:52:50 +08:00
parent fde1d273a8
commit 8733605c7e
1 changed files with 5 additions and 5 deletions

View File

@ -18,12 +18,13 @@ public class FileCacheUtils {
public static void initData(){
String osName = System.getProperty("os.name");
if (osName.matches("^(?i)Windows.*$")) {// Window 系统
if (osName.matches("^(?i)Windows.*$")) {
// Window 系统
path = "conf/jsonconf/";
} else {// Linux 系统
} else {
// Linux 系统
path = "../config/jsonconf/";
}
System.out.printf("打表路径:{%s}",path);
itemFlowResson = readFile("Reason.txt");
// 道具
itemMap = getConfig(SItemConfig.class);
@ -44,8 +45,6 @@ public class FileCacheUtils {
String[] s = line.split("\t");
result.put(Integer.parseInt(s[0].trim()),s[1]);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
@ -77,6 +76,7 @@ public class FileCacheUtils {
try {
String tableName = clazz.getAnnotation(Table.class).name();
String path2 = path+tableName + ".txt";
System.out.printf("打表路径:%s\n",path2);
File file = new File(path2);
if (!file.exists()) {
throw new NullPointerException("clazz.null" + clazz.getName());