ehcache - 主函数调试
平时注解用得多,突然翻到自己以前写的代码,希望以后能用上吧
package test.spring;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Element;
public class TestMap {
public static void main(String[] args) {
CacheManager manager = CacheManager.create("src/config/ehcache.xml");
manager.addCache("testCache");
Cache test = manager.getCache("testCache");
test.put(new Element("key1", "value1"));
manager.shutdown();
}
}
疯狂的妞妞 :每一天,做什么都好,不要什么都不做!