博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
eclipse spring4 ehache2.10 整合
阅读量:6670 次
发布时间:2019-06-25

本文共 1393 字,大约阅读时间需要 4 分钟。

  hot3.png

http://blog.csdn.net/tonytfjing/article/details/39251507

1 maven pom.xml

   
  
org.springframework
spring-context-support
${spring.version}
net.sf.ehcache
ehcache
2.10.0
com.googlecode.ehcache-spring-annotations
ehcache-spring-annotations
1.2.0

2 ehcache.xml

  

3 spring-cache.xml

4 spring4 注解使用

@Service("KpiDailyService")public class KpiDailyServiceImpl implements KpiDailyService {    Logger log = Logger.getLogger(KpiDailyServiceImpl.class);    @Autowired    NewkpidailyMapper mapper;        @Override    @Cacheable(value="myCache", key="#id")      public Newkpidaily getKpiDailyById(String id) {        // TODO Auto-generated method stub        log.info(" invoke getKpiDailyById ;id="+id);        return mapper.selectByPrimaryKey(id);    }}

 

转载于:https://my.oschina.net/sbcagf/blog/782865

你可能感兴趣的文章
GBin1专题之Web热点#8
查看>>
软考信息系统监理师,2016年3月18日作业
查看>>
网易cetus之读写分离
查看>>
【安全牛学习笔记】扫描工具-Nikto
查看>>
ACS报错INIT: Id ”S0” respawning too fast:disabled for 5 minutes
查看>>
Linux文本编辑命令
查看>>
shell介绍,命令历史,命令补全和别名,通配符 ,输入输出重定向
查看>>
RISC和CISC比较
查看>>
作业八
查看>>
eclipse 集成阿里的p3c插件
查看>>
NetWrix免费的Exchange报告工具,确保您知晓微软Exchange Server的变更
查看>>
Android App的架构设计:从VM、MVC、MVP到MVVM
查看>>
怎么样才能实现excel隔行隔列变色效果【已解决】
查看>>
centos6启动流程
查看>>
should use @string resource activity_main.xml
查看>>
1.5 -用户管理
查看>>
python django -- 简单注册/登陆/session
查看>>
PostgreSQL 流复制
查看>>
OpenStack搭建企业私有云 五: Dashboard
查看>>
Linux磁盘管理:LVM逻辑卷基本概念及LVM的工作原理
查看>>