package com.test;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
/**
* description:
* @author: matd
* @version: v1.0
*/
public class ConfigTest {
private static Properties properties;
static {
String proFilePath = System.getProperty("user.dir") + "\\config.properties";
try {
properties = new Properties();
InputStream in = new FileInputStream(proFilePath);
properties.load(in);
} catch (IOException e) {
e.printStackTrace();
}
}
public static String getProperty(String Key) {
return properties.getProperty(Key);
}
}
阅读(2588) | 评论(0) | 转发(0) |