import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
/**
* 读取ipconfig.properties
* @data 2017-12-25
* @author LQ
*/
public class IpConfigUtil {
private static Properties configfile = null;
static {
InputStream in = IpConfigUtil.class.getClassLoader()
.getResourceAsStream("ipconfig.properties");
configfile = new Properties();
try {
configfile.load(in);
in.close();
} catch (IOException e) {
System.out.println("No config.properties defined error");
}finally {
try {
if (in != null) {
in.close();
}
} catch (IOException e) {
in = null;
}
}
}
public String getPropertiesByKey(String _key) {
return configfile.getProperty(_key);
}
}import java.io.IOException;
import java.i