标签:throws xmlns git 结果 res serve ati str string
dubbo集成spring
1.项目依赖
<dependency> |
2.服务提供者
resource/spring下添加dubbo-provider.xml:
<dubbo:application metadata-type="remote" name="demo-provider"/>
|
DemoServiceImpl:
public class DemoServiceImpl implements DemoService { |
public class Application { |
3.服务消费者
resource/spring目录下添加dubbo-consumer.xml
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
applicaiton:
public class Application { |
4.启动zookeeper注册中心
zookeeper3.4.14/bin/zkServer.sh start
5.分别启动服务端和消费端
消费者启动成功后输出: hello world
github地址:
服务端: dubbo-xml-provider
消费端: dubbo-xml-consumer
接口: dubbo-xml-interface
https://github.com/wujinsen/dubbo-learning
标签:throws xmlns git 结果 res serve ati str string
原文地址:https://www.cnblogs.com/wujinsen/p/12591315.html