This tutorial will build a simple project from scratch to demonstrate how to use Dubbo Triple based on POJO, and upgrade to the Triple protocol while the application does not change the existing interface definition. **In this mode, Triple is used in the same way as Dubbo protocol. **
For specific use cases, please refer to: [dubbo-samples-triple/pojo](https://github.com/apache/dubbo-samples/tree/master/3-extensions/protocol/dubbo-samples-triple/src/main/java /org/apache/dubbo/sample/tri/pojo);
First create an empty maven project
Switch to the project directory
Set JDK version in pom.xml
, add Dubbo dependencies and plugins
Add interface definition src/main/java/org/apache/dubbo/Greeter.java
Add server-side interface implementation src/main/java/org/apache/dubbo/GreeterImpl.java
Add server startup class src/main/java/org/apache/dubbo/MyDubboServer.java
Add the client startup class src/main/java/org/apache/dubbo/MyDubboClient.java
Compile the code
Start the server
Open a new terminal and start the client
Since the bottom layer of the Triple protocol needs to rely on the protobuf protocol for transmission, even if the defined service interface does not use protobuf, it is necessary to introduce protobuf dependencies into the environment.