Java Code Examples for org.springframework.cache.ehcache.EhCacheManagerFactoryBean#setConfigLocation()

The following examples show how to use org.springframework.cache.ehcache.EhCacheManagerFactoryBean#setConfigLocation() . 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: EhCacheConfig.java    From MeetingFilm with Apache License 2.0 5 votes vote down vote up
/**
 * EhCache的配置
 */
@Bean
public EhCacheManagerFactoryBean ehcache() {
    EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean();
    ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml"));
    return ehCacheManagerFactoryBean;
}
 
Example 2
Source File: EhCacheConfig.java    From WebStack-Guns with MIT License 5 votes vote down vote up
/**
 * EhCache的配置
 */
@Bean
public EhCacheManagerFactoryBean ehcache() {
    EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean();
    ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml"));
    return ehCacheManagerFactoryBean;
}
 
Example 3
Source File: EhCacheConfiguration.java    From chronus with Apache License 2.0 5 votes vote down vote up
@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 4
Source File: EhCacheConfig.java    From kvf-admin with MIT License 5 votes vote down vote up
@Bean
public EhCacheManagerFactoryBean ehCacheManagerFactoryBean() {
    EhCacheManagerFactoryBean cacheManagerFactoryBean = new EhCacheManagerFactoryBean();
    cacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml"));     // 缓存信息配置文件
    cacheManagerFactoryBean.setShared(true);
    return cacheManagerFactoryBean;
}
 
Example 5
Source File: CacheConfiguration.java    From Spring-Boot-Blog with MIT License 5 votes vote down vote up
@Bean
public EhCacheManagerFactoryBean ehCacheManagerFactoryBean(){
    EhCacheManagerFactoryBean cacheManagerFactoryBean = new EhCacheManagerFactoryBean();
    cacheManagerFactoryBean.setConfigLocation (new ClassPathResource("conf/ehcache.xml"));
    cacheManagerFactoryBean.setShared(true);
    return cacheManagerFactoryBean;
}
 
Example 6
Source File: CacheConfig.java    From cc-s with MIT License 5 votes vote down vote up
/**
 * 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 7
Source File: SpringDispatcherConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean
public EhCacheManagerFactoryBean ehCacheCacheManager() {
	EhCacheManagerFactoryBean cmfb = new EhCacheManagerFactoryBean();
	cmfb.setConfigLocation(resourceLoader.getResource("classpath:ehcache.xml"));
	
	cmfb.setShared(true);
	return cmfb;
}
 
Example 8
Source File: CacheConfiguration.java    From MicroCommunity with Apache License 2.0 5 votes vote down vote up
@Bean
public EhCacheManagerFactoryBean ehCacheManagerFactoryBean(){
    EhCacheManagerFactoryBean cacheManagerFactoryBean = new EhCacheManagerFactoryBean ();
    cacheManagerFactoryBean.setConfigLocation (new ClassPathResource("cache/ehcache-app.xml"));
    cacheManagerFactoryBean.setShared (true);
    return cacheManagerFactoryBean;
}
 
Example 9
Source File: EhCacheConfig.java    From FlyCms with MIT License 5 votes vote down vote up
/**
 * EhCache的配置
 */
@Bean
public EhCacheManagerFactoryBean ehcache() {
    EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean();
    ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml"));
    return ehCacheManagerFactoryBean;
}
 
Example 10
Source File: CacheConfig.java    From api-layer with Eclipse Public License 2.0 5 votes vote down vote up
@Bean
public EhCacheManagerFactoryBean ehCacheCacheManager() {
    EhCacheManagerFactoryBean cmfb = new EhCacheManagerFactoryBean();
    cmfb.setConfigLocation(new ClassPathResource("ehcache.xml"));
    cmfb.setShared(true);
    return cmfb;
}
 
Example 11
Source File: CacheManagerConfig.java    From c2mon with GNU Lesser General Public License v3.0 4 votes vote down vote up
private EhCacheManagerFactoryBean getEhCacheManagerFactoryBean(String configLocation) {
  EhCacheManagerFactoryBean bean = new EhCacheManagerFactoryBean();
  bean.setConfigLocation(new ClassPathResource(configLocation));
  bean.setShared(true);
  return bean;
}
 
Example 12
Source File: EhCacheConfig.java    From web-flash with MIT License 4 votes vote down vote up
@Bean
public EhCacheManagerFactoryBean ehcache() {
    EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean();
    ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml"));
    return ehCacheManagerFactoryBean;
}
 
Example 13
Source File: BasicAuthConfig.java    From ods-provisioning-app with Apache License 2.0 4 votes vote down vote up
@Bean
public EhCacheManagerFactoryBean getEhCacheFactory() {
  EhCacheManagerFactoryBean factoryBean = new EhCacheManagerFactoryBean();
  factoryBean.setConfigLocation(new ClassPathResource("crowd-ehcache.xml"));
  return factoryBean;
}
 
Example 14
Source File: CrowdSecurityConfiguration.java    From ods-provisioning-app with Apache License 2.0 4 votes vote down vote up
@Bean
public EhCacheManagerFactoryBean getEhCacheFactory() {
  EhCacheManagerFactoryBean factoryBean = new EhCacheManagerFactoryBean();
  factoryBean.setConfigLocation(new ClassPathResource("crowd-ehcache.xml"));
  return factoryBean;
}
 
Example 15
Source File: EhCacheConfig.java    From flash-waimai with MIT License 4 votes vote down vote up
@Bean
public EhCacheManagerFactoryBean ehcache() {
    EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean();
    ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml"));
    return ehCacheManagerFactoryBean;
}
 
Example 16
Source File: CachingConfig.java    From Project with Apache License 2.0 4 votes vote down vote up
@Bean
public EhCacheManagerFactoryBean ehcache() {
	EhCacheManagerFactoryBean ehCacheFactoryBean = new EhCacheManagerFactoryBean();
	ehCacheFactoryBean.setConfigLocation(new ClassPathResource("spittr/cache/ehcache.xml"));
	return ehCacheFactoryBean;
}
 
Example 17
Source File: EhCacheConfig.java    From txle with Apache License 2.0 4 votes vote down vote up
@Bean
public EhCacheManagerFactoryBean ehcache() {
    EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean();
    ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml"));
    return ehCacheManagerFactoryBean;
}