tree: 4c104148c2af863bcefc02eaf8ecb5d1a04460c8 [path history] [tgz]
  1. src/
  2. pom.xml
  3. README.md
dubbo-samples-api/README.md

About this sample

This sample code demonstrates building up dubbo service provider and service consumer with the pure API approach. In this example, multicast is facilitated as the registration mechanism, therefore it is necessary to explicitly specify system property java.net.preferIPv4Stack.

Build the project

mvn clean package

Start the service provider

mvn -Djava.net.preferIPv4Stack=true -Dexec.mainClass=org.apache.dubbo.samples.api.invoker.ApiInvokerProviderBootstrap exec:java

Invoke the service consumer

mvn -Djava.net.preferIPv4Stack=true -Dexec.mainClass=org.apache.dubbo.samples.api.invoker.ApiInvokerConsumerBootstrap exec:java