您的位置:首页 > 数据库 > Redis

redisTemplate keys方法 为空

2016-03-22 12:37 846 查看
我遇到的原因是spring.xml配置有问题,应该为:

<bean id="redisTemplate" class="org.springframework.data.redis.core.StringRedisTemplate">

<property name="connectionFactory" ref="connectionFactory" />
</bean>

错误配置:

<bean id="redisTemplate" class="org.springframework.data.redis.core.RedisTemplate">
<property name="connectionFactory" ref="connectionFactory" />
</bean>

下面的配置也不能说是错误,部分功能是可以实现的。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: