增加验证测试程序

This commit is contained in:
yihzhou
2024-06-17 09:21:28 +08:00
parent f05c04f957
commit b37b962dd5
6 changed files with 150 additions and 3 deletions
@@ -0,0 +1,18 @@
package com.sunyard.util;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Properties;
public class Configure {
public static String getKey(String key) throws IOException {
Properties p = new Properties();
InputStream in = new FileInputStream("./sunyard.properties");
InputStreamReader sr = new InputStreamReader(in, "UTF-8");
p.load(sr);
String value = p.getProperty(key).trim();
return value;
}
}