
redis
一路阳光CCG
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
redis多库
@Component public class RedisConfig implements CommandLineRunner { public Map<Integer, StringRedisTemplate> stringRedisTemplateMap = new HashMap<>(); @Override public void run(String... args) throws Exception { for (int i.原创 2021-08-19 11:06:03 · 290 阅读 · 0 评论 -
redis操作
package com.fandemi.utils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.data.redis.connection.DataType; import org.springframework.data.redis.core.Cursor; im.原创 2020-12-17 13:57:58 · 321 阅读 · 0 评论 -
redis配置
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cache="http://www.springfr...原创 2020-01-21 09:29:56 · 162 阅读 · 0 评论 -
springboot2.X整合redis
趁着今天休息就学习了一下redis,刚开始配置的时候遇到一些坑,现在写下来记一下,首先springboot使用的版本是2.X(我使用的是2.1.6)我的是在本地配置的,环境是windows环境,首先要先安装redis 安装rediswindows下载链接:https://github.com/MicrosoftArchive/redis/releases 解压到指定目录即可 进入redis...原创 2019-07-14 14:41:04 · 172 阅读 · 0 评论 -
nested exception is java.lang.NoSuchMethodError: redis.clients.jedis.JedisShardInfo.setTimeout(I)V
spring-data-redis版本问题 当配置redis集群时发现jedis需要使用高一点的版本,我就把jedis改成了 2.9.0, 发现redis.clients.jedis.JedisShardInfo.setTimeout(I)V错误, 把spring-data-redis的版本改成1.8.9.RELEASE就可以了 ...原创 2019-08-29 10:36:38 · 1849 阅读 · 0 评论 -
java.lang.NumberFormatException: For input string: "7001@17001"
正式项目上使用的是集群,因为jedis版本过低导致改成2.9.0, 改完之后发现redis.clients.jedis.JedisShardInfo.setTimeout(I)V错误, 把spring-data-redis的版本改成1.8.9.RELEASE就可以了 ...原创 2019-08-29 12:03:52 · 943 阅读 · 0 评论 -
nested exception is redis.clients.jedis.exceptions.JedisMovedDataException: MOVED 16225 XXX:6379
单机模式转化为集群模式错误,需要修改配置,我是直接修改的xml配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc...原创 2019-08-30 17:28:05 · 2619 阅读 · 1 评论