ehcache集群,集成Ehcache

 2023-09-25 阅读 24 评论 0

摘要:提醒 这一小节的是如何在应用层(service或者module或action类)中使用ehcache 准备工作 下载ehcache ehcache集群?你需要一个js文件 请务必阅读下面代码中的注释!! 分情况选用!! var ioc = {// 直接初始化Ehcache,默认找ehcache.xml文件哦cacheManager : { type : "n

提醒

这一小节的是如何在应用层(service或者module或action类)中使用ehcache

准备工作

下载ehcache

ehcache集群?你需要一个js文件

请务必阅读下面代码中的注释!! 分情况选用!!

var ioc = {// 直接初始化Ehcache,默认找ehcache.xml文件哦cacheManager : { type : "net.sf.ehcache.CacheManager", factory : "net.sf.ehcache.CacheManager#create" } /* // 与shiro共享一个ehcache示例的方式 cacheManager : { type : "net.sf.ehcache.CacheManager", factory : "net.sf.ehcache.CacheManager#getCacheManager", args : ["nutzbook"] // 对应shiro.ini中指定的ehcache.xml中定义的name } */ };

把它放入dao.js同一个文件夹, 并确定在@IocBy中涵盖了这个js

怎么用

在你需要使用Ehcache的地方,加入

@Inject CacheManager cacheManager;

hadoop ha。so, 你已经得到CacheManager,怎么玩就随你了

转载于:https://www.cnblogs.com/telwanggs/p/7727740.html

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/3/96304.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息