ehcache - How to configure Jcache with Ecache as Provider in Spring application-context.xml? -
spring documentation provides below information.
<bean id="cachemanager" class="org.springframework.cache.jcache.jcachecachemanager" p:cache-manager-ref="jcachemanager"/> <!-- jsr-107 cache manager setup --> <bean id="jcachemanager" .../>
i want know how configure jcachemanager bean (with ehcache provider) in spring application context xml.
i have configured dependency, below, in pom.xml fine.
<dependency> <groupid>org.ehcache</groupid> <artifactid>jcache</artifactid> <version>1.0.1</version> <exclusions> <exclusion> <artifactid>slf4j-api</artifactid> <groupid>org.slf4j</groupid> </exclusion> </exclusions> </dependency>
it depends how want configure it. if you're using spring boot 1.3, automatically created you. maybe have source of jcachecacheconfiguration
?
you can retrieve default javax.cache.cachemanager
via caching.getcachingprovider().getcachemanager()
Comments
Post a Comment