/** * redisson cache manager */ @Configuration @ComponentScan @EnableCaching public class RedissonConfig { @Bean(destroyMethod="shutdown") public RedissonClient redisson(@Value("classpath:/redisson-server.json") Resource configFile) throws IOException { Config config = Config.fromJSON(configFile.getInputStream()); return Redisson.create(config); } @Bean public CacheManager cacheManager(RedissonClient redissonClient) throws IOException { return new RedissonSpringCacheManager(redissonClient, "classpath:/redisson-cache.json"); } }
redisson配置
猜你喜欢
转载自ln-software.iteye.com/blog/2353875
今日推荐
周排行