syntax = "proto3"; message Student { string name = 1; int32 age = 2; repeated string subjects = 3; } protoc --java_out=. student.proto import com.example.StudentProtos.*; public class StudentActor extends AbstractActor { @Override public Receive createReceive() { return receiveBuilder() .match(Student.class, student -> { System.out.println("Received student: " + student.getName()); }) .build(); } }


上一篇:
下一篇:
切换中文