Closed FancyJan closed 4 years ago
jprotobuf 2.x 能不能支持生成的java文件的字段按照类型带默认值
比如 proto里面 int a = 1;string b = 2; 在 生成的java文件里面 @Protobuf(fieldType=FieldType.INT32, order=1, required=false) public String a = 0; @Protobuf(fieldType=FieldType.STRING, order=2, required=false) public String b = "";
指 从proto文件,生成jprotobuf java 代码,带上默认值 ,是这个意思吗?
指 从proto文件,生成jprotobuf java 代码,带上默认值 ,是这个意思吗?
是的
现在好像已经支持 ,使用方式如 string message = 1 [default = \"hello\"];
jprotobuf 2.x 能不能支持生成的java文件的字段按照类型带默认值