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