dubbo/dubbo-demo
Albumen Kevin 0f8be9ec93 Fix compile failure 2024-03-14 16:53:04 +08:00
..
dubbo-demo-annotation Merge branch 'apache-3.2' into apache-3.3 2023-11-30 11:30:46 +08:00
dubbo-demo-api Fix compile failure 2024-03-14 16:53:04 +08:00
dubbo-demo-generic-call feat(logging): #13378 Uniformly uses log4j2 as the logging component (#13402) 2023-11-22 09:58:59 +08:00
dubbo-demo-interface Merge branch 'apache-3.2' into apache-3.3 2024-03-05 09:47:49 +08:00
dubbo-demo-native Merge branch 'apache-3.2' into apache-3.3 2024-03-14 15:00:30 +08:00
dubbo-demo-spring-boot fix: fix observationsender error & feat: add DubboTracingObservationHandler (#13818) 2024-03-07 09:33:40 +08:00
dubbo-demo-triple Merge branch 'apache-3.2' into apache-3.3 2023-12-27 23:27:35 +08:00
dubbo-demo-xml Merge branch 'apache-3.2' into apache-3.3 2023-11-30 11:30:46 +08:00
README.md Add -jar for java command in dubbo-demo readme file (#4517) 2019-07-10 13:27:11 +08:00
pom.xml feat(logging): #13378 Uniformly uses log4j2 as the logging component (#13402) 2023-11-22 09:58:59 +08:00

README.md

Dubbo Demo

This directory contains basic usages of Dubbo to help Dubbo developers for debugging and smoke test purpose. If you are looking for Dubbo samples for study purpose, you should look into here where you will find comprehensive usages for how to use Dubbo in different scenarios with the different features.

How To Build

To build all demo applications from the source code, simply step into 'dubbo-demo' directory and use maven to build:

mvn clean package

After build completes, a couple of fat jars are generated under 'target' directory under each module directories, for example: 'dubbo-demo-api-provider-${project.version}.jar' can be found under the directory 'dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/target'.

How To Run

Since the generated artifacts are fat jars backed by spring boot maven plugin, they can be executed directly with 'java -jar', and since multicast is used for service registration, a necessary system property '-Djava.net.preferIPv4Stack=true' is required in order to registry and discover the demo service properly.

Use 'dubbo-demo/dubbo-demo-api' as an example, to start the provider 'dubbo-demo-api-provider', execute the following command:

java -Djava.net.preferIPv4Stack=true -jar dubbo-demo-api-provider-${project.version}.jar

To run the consumer 'dubbo-demo-api-consumer', execute the following command:

java -Djava.net.preferIPv4Stack=true -jar dubbo-demo-api-consumer-${project.version}.jar