多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
public class TestReidsMS { ​ public static void main(String\[\] args) throws InterruptedException { // 创建连接 Jedis jedis\_M = new Jedis("192.168.120.129", 6379); Jedis jedis\_S = new Jedis("192.168.120.129", 6380); ​ jedis\_S.slaveof("127.0.0.1", 6379); ​ jedis\_M.set("k6", "v6"); ​ Thread.sleep(500); System.out.println(jedis\_S.get("k6")); jedis\_M.close(); jedis\_S.close(); } ​ }