apzl_leasing/src_tenwa/com/tenwa/httpclient/resources/QuartzPropertiesUtil.java
2018-06-20 15:56:43 +08:00

36 lines
1.0 KiB
Java

package com.tenwa.httpclient.resources;
import java.io.IOException;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
import com.amarsoft.are.ARE;
public class QuartzPropertiesUtil {
private static final Map<String, String> attributes;
static{
attributes = new ConcurrentHashMap<String, String>();
Properties prop = new Properties();
try {
prop.load(QuartzPropertiesUtil.class.getResourceAsStream("/quartz.properties"));
for(Entry<Object, Object> entry : prop.entrySet()) {
if(entry.getKey() == null || entry.getValue() == null) {
continue;
}
attributes.put(entry.getKey().toString(), entry.getValue().toString());
}
} catch (IOException e) {
e.printStackTrace();
ARE.getLog().error("init QuartzPropertiesUtil info failed");
}
ARE.getLog().info("init QuartzPropertiesUtil info success");
}
public static String get(String propName) {
return attributes.get(propName);
}
}