tree: 51d631537e9b61d7ab6a10ddd2bcd66dd17819e2 [path history] [tgz]
  1. .mvn/
  2. quickstart-api/
  3. quickstart-service/
  4. Dockerfile
  5. HELP.md
  6. mvnw
  7. mvnw.cmd
  8. pom.xml
  9. README.md
11-quickstart/README.md

Getting Started

This project is generated by start.dubbo.apache.org and used as the demonstration code of the quick-start on our official website dubbo.apache.org.

Check more samples from other directories like 1-basic, 2-advanced, etc.

How to run

Install dependencies

Step into ‘11-quickstart’ directory, run the following command:

$ mvn clean install

This will install all the modules especially quickstart-api in the local maven repo.

Run quick start demo

Enter quickstart-service directory:

$ cd 11-quickstart/quickstart-service

then, run the following command to start Dubbo process:

$ mvn compile exec:java -Dexec.mainClass="org.apache.dubbo.samples.quickstart.QuickStartApplication"

Run the following command to see server works as expected:

$ curl \
    --header "Content-Type: application/json" \
    --data '["Dubbo"]' \
    http://localhost:50051/org.apache.dubbo.samples.quickstart.dubbo.api.DemoService/sayHello/

Publish service definition

Publish the Dubbo service definition(java interface) in quickstart-api to maven repository so that consumers that need to call this service can import the definition by importing quickstart-api maven dependency in their pom.xml.

Enter directory quickstart-api

$ cd 11-quickstart/quickstart-api
$ mvn clean deploy

Reference Documentation

For further reference, please consider the following sections: