package com.hinsteny.quartz; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class CacheHandler { private static ApplicationContext actx; Log log = LogFactory.getLog(this.getClass()); /** * 程序载入配置文件<br> * Author:pesome<br> * Time:2006-12-8 上午10:29:26<br> */ public static void init() { try { actx = new ClassPathXmlApplicationContext( new String[] { " quartzCache*.xml " }); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(); } } private CacheHandler() { } /** * 在程序载入配置文件时使用<br> * Author:pesome<br> * Time:2006-12-8 上午10:28:07<br> * @param beanName * @param key * @return */ public static Object getSe(String beanName, String key) { return ((QuartzCache) actx.getBean(beanName)).get(key); } /** * 在web容器中,初始化时载入配置文件时使用<br> * Author:pesome<br> * Time:2006-12-8 上午10:28:40<br> * @param beanName * @param key * @return */ public static Object get(String beanName, String key) { return ((QuartzCache) ContextUtil.getBean(beanName)).get(key); } }

dscing LV8
2018年8月6日
QQ917678383 LV3
2016年8月14日
jiangarctic LV17
2016年8月11日
好脑壳 LV16
2016年4月19日
zhou88 LV9
2015年11月26日
wangwl LV2
2015年11月19日
wr10980170 LV3
2015年11月17日
1102845913 LV4
2015年11月10日
寒樱玉冕 LV12
2015年9月7日
dfhkvvvggc LV3
2015年9月1日