1、Redis可以用来存储Java对象,Jedis有一个方法
String redis.clients.jedis.BinaryJedis.set(byte[] key, byte[] value)
Set the string value as value of the key. The string can't be longer than 1073741824 bytes (1 GB).
Time complexity: O(1)
key和value都是字节数组
2、自定义对象必须实现序列化接口
public class TestObj **implements Serializable**{
public TestObj(){
}
public TestObj(int age,String name){
this.age =age;
this.name = name;
}
private int age;
private