// 取得配置文件中的数值
public static String getStrname(String prpertiesname, String key) throws IOException {
// 配置类的声明
Properties p = new Properties();
//利用当前类的加载获得配置文件名称
p.load(ClassLoader.getSystemResourceAsStream(prpertiesname));
//配置文件中获得key数值
String strvalue = p.get(key).toString();
return strvalue;
}