本文整理汇总了Java中org.springframework.cache.ehcache.EhCacheManagerFactoryBean.setConfigLocation方法的典型用法代码示例。如果您正苦于以下问题:Java EhCacheManagerFactoryBean.setConfigLocation方法的具体用法?Java EhCacheManagerFactoryBean.setConfigLocation怎么用?Java EhCacheManagerFactoryBean.setConfigLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.cache.ehcache.EhCacheManagerFactoryBean
的用法示例。
在下文中一共展示了EhCacheManagerFactoryBean.setConfigLocation方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ehCacheCacheManager
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheManagerFactoryBean ehCacheCacheManager() {
EhCacheManagerFactoryBean cmfb = new EhCacheManagerFactoryBean();
cmfb.setConfigLocation(resourceLoader.getResource("classpath:ehcache.xml"));
cmfb.setShared(true);
return cmfb;
}
示例2: cacheManager
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
@Lazy
@Bean
public EhCacheManagerFactoryBean cacheManager() {
final EhcacheProperties cache = casProperties.getTicket().getRegistry().getEhcache();
final EhCacheManagerFactoryBean bean = new EhCacheManagerFactoryBean();
bean.setConfigLocation(cache.getConfigLocation());
bean.setShared(cache.isShared());
bean.setCacheManagerName(cache.getCacheManagerName());
return bean;
}
示例3: ehCacheManagerFactoryBean
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
@Bean(name="ehCacheManagerFactoryBean")
public EhCacheManagerFactoryBean ehCacheManagerFactoryBean(){
EhCacheManagerFactoryBean cacheManagerFactoryBean = new EhCacheManagerFactoryBean();
cacheManagerFactoryBean.setConfigLocation (new ClassPathResource("ehcache.xml"));
cacheManagerFactoryBean.setShared (true);
return cacheManagerFactoryBean;
}
示例4: ehCacheManagerFactoryBean
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
/**
* ehcache工厂
* @return
*/
@Bean
public EhCacheManagerFactoryBean ehCacheManagerFactoryBean(){
EhCacheManagerFactoryBean cacheManagerFactoryBean = new EhCacheManagerFactoryBean ();
cacheManagerFactoryBean.setConfigLocation (new ClassPathResource(env.getProperty("ehcache.config-location")));
cacheManagerFactoryBean.setShared(Boolean.valueOf(env.getProperty("shared")));
return cacheManagerFactoryBean;
}
示例5: ehcache
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheManagerFactoryBean ehcache(){
EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean();
ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml"));
ehCacheManagerFactoryBean.setShared(true);
return ehCacheManagerFactoryBean;
}
示例6: ehCacheManagerFactoryBean
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
@Bean // 向spring容器中加入bean
public EhCacheManagerFactoryBean ehCacheManagerFactoryBean() {
EhCacheManagerFactoryBean cacheManagerFactoryBean = new EhCacheManagerFactoryBean();
cacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml"));
cacheManagerFactoryBean.setShared(true);
return cacheManagerFactoryBean;
}
示例7: ehCacheManagerFactoryBean
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
/**
* 缓存工厂bean
* @return
*/
@Bean
public EhCacheManagerFactoryBean ehCacheManagerFactoryBean(){
EhCacheManagerFactoryBean factoryBean = new EhCacheManagerFactoryBean();
// 指定xml配置文件
factoryBean.setConfigLocation(new ClassPathResource("ehcache.xml"));
factoryBean.setShared(true);
return factoryBean;
}
示例8: ehCacheManagerFactoryBean
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheManagerFactoryBean ehCacheManagerFactoryBean(){
EhCacheManagerFactoryBean cacheManagerFactoryBean = new EhCacheManagerFactoryBean();
cacheManagerFactoryBean.setConfigLocation (new ClassPathResource("conf/ehcache.xml"));
cacheManagerFactoryBean.setShared(true);
return cacheManagerFactoryBean;
}
示例9: ehCacheCacheManager
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheManagerFactoryBean ehCacheCacheManager() {
EhCacheManagerFactoryBean ehcache = new EhCacheManagerFactoryBean();
ehcache.setConfigLocation(new ClassPathResource("ehcache.xml"));
ehcache.setShared(true);
return ehcache;
}
示例10: ehCacheCacheManager
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheManagerFactoryBean ehCacheCacheManager() {
EhCacheManagerFactoryBean cacheManager = new EhCacheManagerFactoryBean();
cacheManager.setConfigLocation(new ClassPathResource("default-singular-ehcache.xml"));
cacheManager.setShared(true);
return cacheManager;
}
示例11: createCacheManager
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
/**
* Creates the cache manager without registering it.
*
* @param repo the component repository, only used to register secondary items like lifecycle, not null
* @return the cache manager, not null
*/
protected CacheManager createCacheManager(ComponentRepository repo) throws IOException {
EhCacheManagerFactoryBean factoryBean = new EhCacheManagerFactoryBean();
factoryBean.setShared(isShared());
factoryBean.setConfigLocation(ResourceUtils.createResource(getConfigLocation()));
factoryBean.afterPropertiesSet();
return factoryBean.getObject();
}
示例12: ehCacheCacheManager
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheManagerFactoryBean ehCacheCacheManager() {
EhCacheManagerFactoryBean cmfb = new EhCacheManagerFactoryBean();
cmfb.setConfigLocation(new ClassPathResource("ehcache.xml"));
cmfb.setShared(true);
return cmfb;
}
示例13: ehCacheCacheManager
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheManagerFactoryBean ehCacheCacheManager() {
final EhCacheManagerFactoryBean factory = new EhCacheManagerFactoryBean();
factory.setConfigLocation(new ClassPathResource("ehcache.xml"));
factory.setShared(true);
return factory;
}
示例14: ehCacheCacheManager
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheManagerFactoryBean ehCacheCacheManager() {
EhCacheManagerFactoryBean cmfb = new EhCacheManagerFactoryBean();
cmfb.setConfigLocation(new ClassPathResource("ehcache.xml"));
cmfb.setShared(true);
return cmfb;
}
示例15: ehcache
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
@Bean
public EhCacheManagerFactoryBean ehcache() {
EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean();
ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml"));
ehCacheManagerFactoryBean.setShared(true);
return ehCacheManagerFactoryBean;
}