The most common way to use Dubbo is to run it in Spring framework. The following content will guide you to develop a Dubbo application with Spring framework's XML configuration.
最普遍的方式去使用dubbo就在spring框架中运行。以下内容会指引你去开发一个使用spring框架xml配置的dubbo程序。
If you don't want to rely on Spring, you can try using API configuration.
如果你不想依赖spring, 你可以尝试使用api配置。
First let's create a root directory called dubbo-demo:
首先让我们创建一个叫buddo-demo的主目录
mkdir dubbo-demo
cd dubbo-demo
Next, we are going to create 3 sub-directories under root directory:
下一步,我们要在主目录下创建三个子目录:
dubbo-demo-api: the common service api
通用服务API
dubbo-demo-provider: the demo provider codes
提供者的代码用例
dubbo-demo-consumer: the demo consumer codes
消费者的代码用例