RPC核心原理
1. RPC基础
1.3 序列化
常用的序列化
JDK原生序列化
public void test(String filePath) {
FileOutputStream fos = new FileOutputStream(filePath);
Student student = new Student();
student.setNo(100);
student.setName("TEST_STUDENT");
//ObjectOutputStream对student对象序列化
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(student);
oos.flush();
oos.close();
FileInputStream fis = new FileInputStream(filePath)