org.springframework.cache.ehcache.EhCacheManagerFactoryBean Java Examples
The following examples show how to use
org.springframework.cache.ehcache.EhCacheManagerFactoryBean.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CacheManagerConfig.java From c2mon with GNU Lesser General Public License v3.0 | 6 votes |
@Bean public EhCacheManagerFactoryBean ehCacheManagerFactoryBean() throws IOException { String cacheMode = properties.getMode(); switch (cacheMode) { case "single-nonpersistent": return getEhCacheManagerFactoryBean("ehcache/ehcache-single-nonpersistent.xml"); case "single": return getEhCacheManagerFactoryBean("ehcache/ehcache-single.xml"); case "multi": return getEhCacheManagerFactoryBean("ehcache/ehcache-multi.xml"); default: throw new IOException(format("Unsupported cache mode specified: '%s'", cacheMode)); } }
Example #2
Source File: ShiroConfig.java From MeetingFilm with Apache License 2.0 | 5 votes |
/** * 缓存管理器 使用Ehcache实现 */ @Bean public CacheManager getCacheShiroManager(EhCacheManagerFactoryBean ehcache) { EhCacheManager ehCacheManager = new EhCacheManager(); ehCacheManager.setCacheManager(ehcache.getObject()); return ehCacheManager; }
Example #3
Source File: CacheConfiguration.java From MicroCommunity with Apache License 2.0 | 5 votes |
@Bean public EhCacheManagerFactoryBean ehCacheManagerFactoryBean(){ EhCacheManagerFactoryBean cacheManagerFactoryBean = new EhCacheManagerFactoryBean (); cacheManagerFactoryBean.setConfigLocation (new ClassPathResource("cache/ehcache-app.xml")); cacheManagerFactoryBean.setShared (true); return cacheManagerFactoryBean; }
Example #4
Source File: CacheConfig.java From api-layer with Eclipse Public License 2.0 | 5 votes |
@Bean public EhCacheManagerFactoryBean ehCacheCacheManager() { EhCacheManagerFactoryBean cmfb = new EhCacheManagerFactoryBean(); cmfb.setConfigLocation(new ClassPathResource("ehcache.xml")); cmfb.setShared(true); return cmfb; }
Example #5
Source File: EhCacheConfig.java From FlyCms with MIT License | 5 votes |
/** * EhCache的配置 */ @Bean public EhCacheManagerFactoryBean ehcache() { EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean(); ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml")); return ehCacheManagerFactoryBean; }
Example #6
Source File: SpringDispatcherConfig.java From Spring-5.0-Cookbook with MIT License | 5 votes |
@Bean public EhCacheManagerFactoryBean ehCacheCacheManager() { EhCacheManagerFactoryBean cmfb = new EhCacheManagerFactoryBean(); cmfb.setConfigLocation(resourceLoader.getResource("classpath:ehcache.xml")); cmfb.setShared(true); return cmfb; }
Example #7
Source File: CacheConfig.java From cc-s with MIT License | 5 votes |
/** * 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; }
Example #8
Source File: CacheConfiguration.java From Spring-Boot-Blog with MIT License | 5 votes |
@Bean public EhCacheManagerFactoryBean ehCacheManagerFactoryBean(){ EhCacheManagerFactoryBean cacheManagerFactoryBean = new EhCacheManagerFactoryBean(); cacheManagerFactoryBean.setConfigLocation (new ClassPathResource("conf/ehcache.xml")); cacheManagerFactoryBean.setShared(true); return cacheManagerFactoryBean; }
Example #9
Source File: EhCacheConfig.java From kvf-admin with MIT License | 5 votes |
@Bean public EhCacheManagerFactoryBean ehCacheManagerFactoryBean() { EhCacheManagerFactoryBean cacheManagerFactoryBean = new EhCacheManagerFactoryBean(); cacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml")); // 缓存信息配置文件 cacheManagerFactoryBean.setShared(true); return cacheManagerFactoryBean; }
Example #10
Source File: EhCacheConfiguration.java From chronus with Apache License 2.0 | 5 votes |
@Bean public EhCacheManagerFactoryBean cacheManager() { ClassPathResource config = new ClassPathResource("/cache/ehcache-local.xml"); EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean(); ehCacheManagerFactoryBean.setConfigLocation(config); log.debug("EhCacheManagerFactoryBean初始化完成"); return ehCacheManagerFactoryBean; }
Example #11
Source File: EhCacheConfig.java From WebStack-Guns with MIT License | 5 votes |
/** * EhCache的配置 */ @Bean public EhCacheManagerFactoryBean ehcache() { EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean(); ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml")); return ehCacheManagerFactoryBean; }
Example #12
Source File: ShiroConfig.java From WebStack-Guns with MIT License | 5 votes |
/** * 缓存管理器 使用Ehcache实现 */ @Bean public CacheManager getCacheShiroManager(EhCacheManagerFactoryBean ehcache) { EhCacheManager ehCacheManager = new EhCacheManager(); ehCacheManager.setCacheManager(ehcache.getObject()); return ehCacheManager; }
Example #13
Source File: EhCacheConfig.java From MeetingFilm with Apache License 2.0 | 5 votes |
/** * EhCache的配置 */ @Bean public EhCacheManagerFactoryBean ehcache() { EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean(); ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml")); return ehCacheManagerFactoryBean; }
Example #14
Source File: EhCacheFacadeParser.java From cacheonix-core with GNU Lesser General Public License v2.1 | 4 votes |
/** * @see AbstractCacheManagerAndProviderFacadeParser#getCacheManagerClass() */ protected Class getCacheManagerClass() { return EhCacheManagerFactoryBean.class; }
Example #15
Source File: CacheManagerConfig.java From c2mon with GNU Lesser General Public License v3.0 | 4 votes |
private EhCacheManagerFactoryBean getEhCacheManagerFactoryBean(String configLocation) { EhCacheManagerFactoryBean bean = new EhCacheManagerFactoryBean(); bean.setConfigLocation(new ClassPathResource(configLocation)); bean.setShared(true); return bean; }
Example #16
Source File: EhCacheConfig.java From web-flash with MIT License | 4 votes |
@Bean public EhCacheManagerFactoryBean ehcache() { EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean(); ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml")); return ehCacheManagerFactoryBean; }
Example #17
Source File: ACLContext.java From tutorials with MIT License | 4 votes |
@Bean public EhCacheManagerFactoryBean aclCacheManager() { return new EhCacheManagerFactoryBean(); }
Example #18
Source File: CacheConfiguration.java From MicroCommunity with Apache License 2.0 | 4 votes |
@Bean(name = "appEhCacheCacheManager") public EhCacheCacheManager ehCacheCacheManager(EhCacheManagerFactoryBean bean){ return new EhCacheCacheManager (bean.getObject()); }
Example #19
Source File: SpringMvcCacheConfig.java From Hands-On-High-Performance-with-Spring-5 with MIT License | 4 votes |
@Bean public EhCacheManagerFactoryBean cacheManagerFactoryBean() { EhCacheManagerFactoryBean cacheManager = new EhCacheManagerFactoryBean(); return cacheManager; }
Example #20
Source File: BasicAuthConfig.java From ods-provisioning-app with Apache License 2.0 | 4 votes |
@Bean public EhCacheManagerFactoryBean getEhCacheFactory() { EhCacheManagerFactoryBean factoryBean = new EhCacheManagerFactoryBean(); factoryBean.setConfigLocation(new ClassPathResource("crowd-ehcache.xml")); return factoryBean; }
Example #21
Source File: CrowdSecurityConfiguration.java From ods-provisioning-app with Apache License 2.0 | 4 votes |
@Bean public EhCacheManagerFactoryBean getEhCacheFactory() { EhCacheManagerFactoryBean factoryBean = new EhCacheManagerFactoryBean(); factoryBean.setConfigLocation(new ClassPathResource("crowd-ehcache.xml")); return factoryBean; }
Example #22
Source File: EhCacheConfig.java From flash-waimai with MIT License | 4 votes |
@Bean public EhCacheManagerFactoryBean ehcache() { EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean(); ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml")); return ehCacheManagerFactoryBean; }
Example #23
Source File: CachingConfig.java From Project with Apache License 2.0 | 4 votes |
@Bean public EhCacheManagerFactoryBean ehcache() { EhCacheManagerFactoryBean ehCacheFactoryBean = new EhCacheManagerFactoryBean(); ehCacheFactoryBean.setConfigLocation(new ClassPathResource("spittr/cache/ehcache.xml")); return ehCacheFactoryBean; }
Example #24
Source File: EhCacheConfig.java From txle with Apache License 2.0 | 4 votes |
@Bean public EhCacheManagerFactoryBean ehcache() { EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean(); ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml")); return ehCacheManagerFactoryBean; }
Example #25
Source File: CacheConfig.java From cc-s with MIT License | 2 votes |
/** * ehcache管理器 * @param bean * @return */ @Bean public EhCacheCacheManager ehCacheCacheManager(EhCacheManagerFactoryBean bean){ return new EhCacheCacheManager(bean.getObject()); }
Example #26
Source File: EhCacheConfig.java From kvf-admin with MIT License | 2 votes |
/** * ehcache 主要的管理器 * * @param cacheManagerFactoryBean cm * @return ec */ @Bean public EhCacheCacheManager ehCacheCacheManager(EhCacheManagerFactoryBean cacheManagerFactoryBean) { return new EhCacheCacheManager(cacheManagerFactoryBean.getObject()); }