码迷,mamicode.com
首页 > 编程语言 > 详细

SpringCache

时间:2017-12-28 00:00:03      阅读:206      评论:0      收藏:0      [点我收藏+]

标签:beans   def   3.1   actor   pca   ota   html   ring   support   

官方文档:https://docs.spring.io/spring/docs/4.3.13.RELEASE/spring-framework-reference/htmlsingle/#cache

对应的XML配置文件:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cache="http://www.springframework.org/schema/cache"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">

    <cache:annotation-driven/>
    <bean id="cacheManager" class="org.springframework.cache.support.SimpleCacheManager">
        <property name="caches">
            <set>
                <bean class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean">
                    <property name="name" value="default"/>
                </bean>
            </set>
        </property>
    </bean>
    <bean id="cacheManager2" class="org.springframework.cache.concurrent.ConcurrentMapCacheManager">
    </bean>

</beans>

 

 

SpringCache

标签:beans   def   3.1   actor   pca   ota   html   ring   support   

原文地址:https://www.cnblogs.com/heapStark/p/8127904.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!