mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-06 20:26:05 +00:00
test[protobuf]: test proto generation
This commit is contained in:
@@ -18,6 +18,9 @@ public class PbGenerateOperation {
|
||||
private String protoPath;
|
||||
private String outputPath;
|
||||
private String javaPackage;
|
||||
/**
|
||||
* 生成的类是否是record
|
||||
*/
|
||||
private boolean recordClass = false;
|
||||
|
||||
public String getProtoPath() {
|
||||
|
||||
@@ -8,6 +8,7 @@ option java_package = "start";
|
||||
|
||||
// start_protocol_id = 100
|
||||
|
||||
// 如果protobuf的字段的tag超过1000,则视这个字段为需要兼容的协议字段
|
||||
message AllType {
|
||||
bool field1 = 1;
|
||||
bytes field2 = 2;
|
||||
@@ -24,6 +25,7 @@ message AllType {
|
||||
sint32 field14 = 14;
|
||||
sint64 field15 = 15;
|
||||
string field16 = 16;
|
||||
// 这是注释
|
||||
uint32 field17 = 17;
|
||||
uint64 field18 = 18;
|
||||
uint64 field18 = 1001;
|
||||
}
|
||||
Reference in New Issue
Block a user