2016年12月6日

Redis应用场景

摘要: 1.在主页中显示最新的项目列表。 Redis使用的是常驻内存的缓存,速度非常快。LPUSH用来插入一个内容ID,作为关键字存储在列表头部。LTRIM用来限制列表中的项目数最多为5000。如果用户需要的检索的数据量超越这个缓存容量,这时才需要把请求发送到数据库。2.删除和过滤。如果一篇文章被删除,可以 阅读全文

posted @ 2016-12-06 16:55 samirL 阅读(214) 评论(0) 推荐(0) 编辑

spring的context:exclude-filter 与 context:include-filter

摘要: 1 在主容器中(applicationContext.xml),将Controller的注解打消掉 <context:component-scan base-package="com"> <context:exclude-filter type="annotation" expression="or 阅读全文

posted @ 2016-12-06 16:53 samirL 阅读(1573) 评论(0) 推荐(1) 编辑

Spring的<context:annotation-config>和<annotation-driven>

摘要: <context:annotation-config> 相对于注册 AutowiredAnnotationBeanPostProcessor、CommonAnnotationBeanPostProcessor、 PersistenceAnnotationBeanPostProcessor 以及 Re 阅读全文

posted @ 2016-12-06 16:51 samirL 阅读(171) 评论(0) 推荐(0) 编辑

导航