增加验证测试程序
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user