java代码连接redis
RedisURI uri = RedisURI.Builder.redis("XXXX", 16379) .withDatabase(6) .withPassword("XXXX") .build(); redisClient = RedisClient.create(uri); connect= redisClient.connect(); RedisCommands syncCommands = connect.sync(); Object count = syncCommands.get("count");