3.7K Star 12K Fork 4.6K

卓源软件 / JeeSite 4.2

 / 详情

使用redis怎么切换不同的redis库

Backlog
Opened this issue  
2021-05-17 16:05

LettuceConnectionFactory connectionFactory = (LettuceConnectionFactory) redisTemplate.getConnectionFactory();
connectionFactory.setDatabase(2);
redisTemplate.setConnectionFactory(connectionFactory);
connectionFactory.resetConnection();

上面这段代码应该可以切库的,但是调试查看数据没有改成功,是怎么回事呢

Comments (0)

难以置信 created任务
难以置信 set related repository to 卓源软件/JeeSite 4.2
难以置信 changed description
展开全部操作日志

Sign in to comment

状态
Assignees
Milestones
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(1)
Java
1
https://gitee.com/thinkgem/jeesite4.git
git@gitee.com:thinkgem/jeesite4.git
thinkgem
jeesite4
JeeSite 4.2

Search