tree: d522a4fd4616ccfca0f424c7c3f9c6f8cdaaefde [path history] [tgz]
  1. src/
  2. case-configuration.yml
  3. case-versions.conf
  4. pom.xml
  5. README.md
dubbo-samples-zookeeper/README.md

Dubbo Zookeeper Example

This example shows how to use zookeeper as Dubbo's registry center.

How To Run

Step 1. Start Zookeeper as Registry Center

In this example, a docker compose file is provided to start the required zookeeper easily. But at the same time, it requires you to prepare docker environment as a prerequisite. You can refer to docker quick start to install.

cd src/main/resources/docker
docker-compose up

Step 2. Build Examples

Execute the following maven command under dubbo-samples-zookeeper directory, or simply import the whole sample project into IDE.

mvn clean package

Step 3. Run Examples

  1. Run ProviderBootstrap to start service provider
  2. Run ConsumerBootstrap to start service consumer, you should see the following result in the console:
result: hello, zookeeper