Search in sources :

Example 11 with EhCacheManagerFactoryBean

use of org.springframework.cache.ehcache.EhCacheManagerFactoryBean in project oc-explorer by devgateway.

the class CacheConfiguration method ehCacheManagerFactoryBean.

@Bean
public EhCacheManagerFactoryBean ehCacheManagerFactoryBean() {
    EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean();
    ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml"));
    ehCacheManagerFactoryBean.setShared(true);
    return ehCacheManagerFactoryBean;
}
Also used : EhCacheManagerFactoryBean(org.springframework.cache.ehcache.EhCacheManagerFactoryBean) ClassPathResource(org.springframework.core.io.ClassPathResource) EhCacheManagerFactoryBean(org.springframework.cache.ehcache.EhCacheManagerFactoryBean) Bean(org.springframework.context.annotation.Bean)

Example 12 with EhCacheManagerFactoryBean

use of org.springframework.cache.ehcache.EhCacheManagerFactoryBean in project mica2 by obiba.

the class CacheConfiguration method cacheManagerFactory.

@Bean
public EhCacheManagerFactoryBean cacheManagerFactory() {
    log.debug("Starting Ehcache");
    EhCacheManagerFactoryBean factoryBean = new EhCacheManagerFactoryBean();
    factoryBean.setCacheManagerName("mica");
    return factoryBean;
}
Also used : EhCacheManagerFactoryBean(org.springframework.cache.ehcache.EhCacheManagerFactoryBean) EhCacheManagerFactoryBean(org.springframework.cache.ehcache.EhCacheManagerFactoryBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

EhCacheManagerFactoryBean (org.springframework.cache.ehcache.EhCacheManagerFactoryBean)12 Bean (org.springframework.context.annotation.Bean)11 ClassPathResource (org.springframework.core.io.ClassPathResource)7 EhCacheFactoryBean (org.springframework.cache.ehcache.EhCacheFactoryBean)3 EhcacheProperties (org.apereo.cas.configuration.model.support.ehcache.EhcacheProperties)2 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)2 lombok.val (lombok.val)1 EhCacheManager (org.apache.shiro.cache.ehcache.EhCacheManager)1 ShiroFilterFactoryBean (org.apache.shiro.spring.web.ShiroFilterFactoryBean)1 MethodInvokingFactoryBean (org.springframework.beans.factory.config.MethodInvokingFactoryBean)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Lazy (org.springframework.context.annotation.Lazy)1