|
|
@@ -13,8 +13,8 @@ import org.springframework.data.redis.serializer.StringRedisSerializer;
|
|
|
|
|
|
/**
|
|
|
* redis配置
|
|
|
- *
|
|
|
-
|
|
|
+ *
|
|
|
+
|
|
|
*/
|
|
|
@Configuration
|
|
|
@EnableCaching
|
|
|
@@ -22,9 +22,9 @@ public class RedisConfig extends CachingConfigurerSupport
|
|
|
{
|
|
|
@Bean
|
|
|
@SuppressWarnings(value = { "unchecked", "rawtypes" })
|
|
|
- public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory connectionFactory)
|
|
|
+ public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory connectionFactory)
|
|
|
{
|
|
|
- RedisTemplate<Object, Object> template = new RedisTemplate<>();
|
|
|
+ RedisTemplate<String, Object> template = new RedisTemplate<>();
|
|
|
template.setConnectionFactory(connectionFactory);
|
|
|
|
|
|
FastJson2JsonRedisSerializer serializer = new FastJson2JsonRedisSerializer(Object.class);
|