地质所 沉降监测网建设项目
zmk
2024-06-25 7fe5fb39e00749e4e412ced5703a61036752c874
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package com.javaweb.ehcache.config;
 
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
 
@Configuration
public class EhCacheConfig {
 
    @Bean("ehCacheManager")
    public EhCacheManagerFactoryBean getEhCacheManagerFactoryBean(){
        EhCacheManagerFactoryBean ehCacheManagerFactoryBean=new EhCacheManagerFactoryBean();
        ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("config/ehcache-local.xml"));
        return ehCacheManagerFactoryBean;
    }
 
}