Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/telkomdev/javaprotobufdemo
Protocol Buffer demo using Java
https://github.com/telkomdev/javaprotobufdemo
Last synced: about 5 hours ago
JSON representation
Protocol Buffer demo using Java
- Host: GitHub
- URL: https://github.com/telkomdev/javaprotobufdemo
- Owner: telkomdev
- Created: 2019-10-01T18:19:38.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-04T23:53:34.000Z (about 2 years ago)
- Last Synced: 2023-03-04T15:52:52.988Z (over 1 year ago)
- Language: Java
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Protocol Buffer demo using Java
## Getting started
- Install `Maven`
https://maven.apache.org/download.cgi- Generate Proto Java from `.proto` file
Protobuf file look like this
```protobuf
syntax="proto3";package product;
option java_package = "com.telkomdev.protodemo";
option java_outer_classname = "ProductProtos";message Product {
string ID = 1;
string Name = 2;
uint64 Quantity = 3;
repeated string Images = 4;
}message ProductList {
repeated Product Products = 1;
}
``````shell
$ make gen
```- Build `jar`
```shell
$ mvn clean package
```- Run `jar`
```shell
$ java -jar target/JavaProtobufDemo-1.0-SNAPSHOT.jar
```