首页>代码>基于SpringBoot+spring mvc+Mybatis+beetl+bootstrap实现的简洁开源网站后台管理系统Guns>/guns/guns-admin/src/main/java/com/stylefeng/guns/config/EhCacheConfig.java
package com.stylefeng.guns.config;
import net.sf.ehcache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.ehcache.EhCacheCacheManager;
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
/**
* ehcache配置
*
* @author fengshuonan
* @date 2017-05-20 23:11
*/
@Configuration
@EnableCaching
public class EhCacheConfig {
/**
* EhCache的配置
*/
@Bean
public EhCacheCacheManager cacheManager(CacheManager cacheManager) {
return new EhCacheCacheManager(cacheManager);
}
/**
* EhCache的配置
*/
@Bean
public EhCacheManagerFactoryBean ehcache() {
EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean();
ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml"));
return ehCacheManagerFactoryBean;
}
}
最近下载更多
1158919118 LV1
2023年12月13日
hhvivi LV2
2023年7月2日
iceboard LV2
2023年2月26日
1114581129 LV2
2022年7月6日
2468867327 LV10
2022年5月18日
菠萝蜜 LV3
2022年4月4日
Jackson_李 LV8
2022年3月24日
刘亦菲9527 LV15
2022年1月26日
微信网友_5798314812231680
2022年1月21日
暂无贡献等级
huaua7676 LV30
2021年11月23日

最近浏览