根据网上代码配置spring-data-redis
配置完成进行测试,使用RedisTemplate对象进行查询操作查不到任何东西,也不报错
然后找找找,终于找到原因了:
我的配置(无法正常使用的版本):
<bean id="redisTemplate" class="org.springframework.data.redis.core.RedisTemplate">
<property name="connectionFactory" ref="jeidsConnectionFactory"/>
</bean>
查看了各个博客配置后修改为(可以正常使用):
<bean id="redisTemplate" class="org.springframework.data.redis.core.StringRedisTemplate">
<property name="connectionFactory" ref="jeidsConnectionFactory"/>
</bean>
问题就来了,RedisTemplate和StringRedisTemplate是什么鬼,记录一下,待完善