use of org.eweb4j.config.bean.ConfigBean in project eweb4j-framework by laiweiwei.
the class Props method writeProp.
public static synchronized void writeProp(String propId, Map<String, String> data) throws IOException {
if (propId == null)
return;
ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigBean.class.getName());
List<Prop> files = cb.getProperties().getFile();
for (Prop f : files) {
if (propId.equals(f.getId())) {
Map<String, String> map = props.get(propId);
if (map == null) {
map = new Hashtable<String, String>();
props.put(propId, map);
}
map.putAll(data);
String filePath = ConfigConstant.CONFIG_BASE_PATH + f.getPath();
writeProperties(filePath, data);
break;
}
}
}
use of org.eweb4j.config.bean.ConfigBean in project eweb4j-framework by laiweiwei.
the class LogFactory method getIOCLogger.
public static Log getIOCLogger(Class<?> clazz) {
ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigBean.class.getName());
LogsConfigBean logs = cb == null ? new LogsConfigBean() : cb.getIoc().getLogs();
return new LogImpl(logs, "IOC", clazz);
}
use of org.eweb4j.config.bean.ConfigBean in project eweb4j-framework by laiweiwei.
the class LogFactory method getMVCLogger.
public static Log getMVCLogger(Class<?> clazz) {
ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigBean.class.getName());
LogsConfigBean logs = cb == null ? new LogsConfigBean() : cb.getMvc().getLogs();
return new LogImpl(logs, "MVC", clazz);
}
Aggregations