| @@ -1,9 +1,11 @@ | |||
| package com.iformall.config; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.cache.CacheManager; | |||
| @@ -122,4 +124,21 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| return template; | |||
| } | |||
| @Bean("couponChannelRedisTemplate") | |||
| public RedisTemplate<String, PageInfo<WxCouponChannelVo>> getCouponChannelRedisTemplate(RedisConnectionFactory connectionFactory) { | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); | |||
| Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); | |||
| // value值的序列化 | |||
| template.setValueSerializer(j); | |||
| template.setHashKeySerializer(j); | |||
| // key的序列化 | |||
| template.setKeySerializer(new StringRedisSerializer()); | |||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||
| template.setConnectionFactory(connectionFactory); | |||
| return template; | |||
| } | |||
| } | |||
| @@ -1,9 +1,11 @@ | |||
| package com.iformall.config; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.cache.CacheManager; | |||
| @@ -160,4 +162,21 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| return template; | |||
| } | |||
| @Bean("couponChannelRedisTemplate") | |||
| public RedisTemplate<String, PageInfo<WxCouponChannelVo>> getCouponChannelRedisTemplate(RedisConnectionFactory connectionFactory) { | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); | |||
| Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); | |||
| // value值的序列化 | |||
| template.setValueSerializer(j); | |||
| template.setHashKeySerializer(j); | |||
| // key的序列化 | |||
| template.setKeySerializer(new StringRedisSerializer()); | |||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||
| template.setConnectionFactory(connectionFactory); | |||
| return template; | |||
| } | |||
| } | |||
| @@ -1,9 +1,11 @@ | |||
| package com.iformall.config; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.cache.CacheManager; | |||
| @@ -122,4 +124,20 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| return template; | |||
| } | |||
| @Bean("couponChannelRedisTemplate") | |||
| public RedisTemplate<String, PageInfo<WxCouponChannelVo>> getCouponChannelRedisTemplate(RedisConnectionFactory connectionFactory) { | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); | |||
| Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); | |||
| // value值的序列化 | |||
| template.setValueSerializer(j); | |||
| template.setHashKeySerializer(j); | |||
| // key的序列化 | |||
| template.setKeySerializer(new StringRedisSerializer()); | |||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||
| template.setConnectionFactory(connectionFactory); | |||
| return template; | |||
| } | |||
| } | |||
| @@ -1,9 +1,11 @@ | |||
| package com.iformall.config; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.cache.CacheManager; | |||
| @@ -145,4 +147,21 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| return template; | |||
| } | |||
| @Bean("couponChannelRedisTemplate") | |||
| public RedisTemplate<String, PageInfo<WxCouponChannelVo>> getCouponChannelRedisTemplate(RedisConnectionFactory connectionFactory) { | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); | |||
| Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); | |||
| // value值的序列化 | |||
| template.setValueSerializer(j); | |||
| template.setHashKeySerializer(j); | |||
| // key的序列化 | |||
| template.setKeySerializer(new StringRedisSerializer()); | |||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||
| template.setConnectionFactory(connectionFactory); | |||
| return template; | |||
| } | |||
| } | |||
| @@ -1,9 +1,11 @@ | |||
| package com.iformall.config; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxScoreRules; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.cache.CacheManager; | |||
| @@ -144,4 +146,21 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| return template; | |||
| } | |||
| @Bean("couponChannelRedisTemplate") | |||
| public RedisTemplate<String, PageInfo<WxCouponChannelVo>> getCouponChannelRedisTemplate(RedisConnectionFactory connectionFactory) { | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> template = new RedisTemplate<>(); | |||
| Jackson2JsonRedisSerializer<PageInfo> j = new Jackson2JsonRedisSerializer<PageInfo>(PageInfo.class); | |||
| // value值的序列化 | |||
| template.setValueSerializer(j); | |||
| template.setHashKeySerializer(j); | |||
| // key的序列化 | |||
| template.setKeySerializer(new StringRedisSerializer()); | |||
| template.setHashKeySerializer(new StringRedisSerializer()); | |||
| template.setConnectionFactory(connectionFactory); | |||
| return template; | |||
| } | |||
| } | |||