本文整理汇总了Java中org.springframework.cache.ehcache.EhCacheManagerFactoryBean.getObject方法的典型用法代码示例。如果您正苦于以下问题:Java EhCacheManagerFactoryBean.getObject方法的具体用法?Java EhCacheManagerFactoryBean.getObject怎么用?Java EhCacheManagerFactoryBean.getObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.cache.ehcache.EhCacheManagerFactoryBean
的用法示例。
在下文中一共展示了EhCacheManagerFactoryBean.getObject方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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();
}
示例2: ehCacheCacheManager
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
@Bean(name = "appEhCacheCacheManager")
public EhCacheCacheManager ehCacheCacheManager(EhCacheManagerFactoryBean bean) {
return new EhCacheCacheManager(bean.getObject());
}
示例3: cacheManager
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
@Bean
@Primary
public CacheManager cacheManager(EhCacheManagerFactoryBean ehCacheManagerFactoryBean) {
return new EhCacheCacheManager(ehCacheManagerFactoryBean.getObject());
}
示例4: ehCacheCacheManager
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
/**
* ehcache管理器
* @param bean
* @return
*/
@Bean
public EhCacheCacheManager ehCacheCacheManager(EhCacheManagerFactoryBean bean){
return new EhCacheCacheManager(bean.getObject());
}
示例5: ehCacheCacheManager
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; //导入方法依赖的package包/类
/**
* ehcache 主要的管理器
* @param bean
* @return
*/
@Bean
public EhCacheCacheManager ehCacheCacheManager(EhCacheManagerFactoryBean bean){
return new EhCacheCacheManager(bean.getObject());
}