1、超期提醒修改2、超期时间计算修改
parent
c2fbfd7ba6
commit
3bd7ba34ea
@ -0,0 +1,29 @@
|
||||
package com.emr.util;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
|
||||
public class PropertiesUtils {
|
||||
private static String fileName = "\\config\\config.properties";
|
||||
private static Properties props;
|
||||
|
||||
synchronized static private void loadProps(){
|
||||
if (props==null) {
|
||||
props = new Properties();
|
||||
ClassLoader loader = Thread.currentThread().getContextClassLoader();
|
||||
try {
|
||||
props.load(loader.getResourceAsStream(fileName));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String getProperty(String key){
|
||||
if(null == props) {
|
||||
loadProps();
|
||||
}
|
||||
return props.getProperty(key);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue