1
0
mirror of https://github.com/apache/dubbo.git synced 2024-10-23 07:04:37 +08:00
dubbo/dubbo-demo
huazhongming 704a08d024
Support native ci check (#11358)
* support ci for native

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

* Change the serialization of native demo to fastjson2

Signed-off-by: crazyhzm <crazyhzm@gmail.com>

Signed-off-by: crazyhzm <crazyhzm@gmail.com>
2023-01-20 14:03:41 +08:00
..
dubbo-demo-annotation Fastjson2 Support (#10166) 2022-07-15 10:18:41 +08:00
dubbo-demo-api Fastjson2 Support (#10166) 2022-07-15 10:18:41 +08:00
dubbo-demo-generic-call Fastjson2 Support (#10166) 2022-07-15 10:18:41 +08:00
dubbo-demo-interface optimize: example add Triple protocol Demo (#8643) 2021-09-01 17:20:27 +08:00
dubbo-demo-native Support native ci check (#11358) 2023-01-20 14:03:41 +08:00
dubbo-demo-spring-boot Add coverage module & file lint test (#10920) 2022-11-12 14:39:33 +08:00
dubbo-demo-triple Update protobuf-java version in both dependency and plugin (#11261) 2023-01-10 14:13:12 +08:00
dubbo-demo-xml remind user to add qos dependency (#10683) 2022-10-24 11:13:25 +08:00
pom.xml Add dubbo spring boot demo (#9244) 2021-11-13 14:47:09 +08:00
README.md Add -jar for java command in dubbo-demo readme file (#4517) 2019-07-10 13:27:11 +08:00

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