Skip to content

Demonstrates how to read and load protobuf definitions at run-time using protobuf descriptors in Java

Notifications You must be signed in to change notification settings

faizan2786/loading-protobuf-using-descriptors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

loading-protobuf-using-descriptors

This repot demonstrates how to read and load protobuf definitions at run-time using protobuf descriptors in Java

How to run using custom descriptor files

  • Generate protobuf descriptor-set file of your .proto files using prtobuf compilers using following command:
    protoc -I=\path\to\proto-files\ --descriptor_set_out=\path\to\output-file.proto input_file1.proto [input_file2.proto ...]

  • copy the generated descriptor file in the resources folder

  • Generate jar package usign: mvn clean package command.

  • execute the jar file by providing descriptor file name in the argument:
    java -jar file-descriptor-1.0-SNAPSHOT-jar-with-dependencies descriptor-file-name.proto

About

Demonstrates how to read and load protobuf definitions at run-time using protobuf descriptors in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages