标签:dex 序列 xquery xmlns encoding service 官网 userinfo check
官网:http://dubbo.io/
1.xml配置
(1)生产者:(下面该配置既是生产者也是消费者)
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://code.alibabatech.com/schema/dubbo
http://code.alibabatech.com/schema/dubbo/dubbo.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<bean class="x.x.x.xxApplicationContext" />
<dubbo:application name="项目名字" organization="dubbox"/>
<!-- dubbo 注册中心的地址 -->
<dubbo:registry address="${address}" />
<!-- 生成远程服务代理,可以和本地bean一样使用demoService -->
<dubbo:reference id="userService" interface="x.x.x.userService" check="false">
</dubbo:reference>
</beans>
telnet localhost 20880(provider dubbo server port)
正常情况下,进入telnet窗口,键入回车进入dubbo命令模式。
ls 查看提供的服务
invoke x.x.x..userService.getUserInfo({"userId":"10000"})看返回结果
标签:dex 序列 xquery xmlns encoding service 官网 userinfo check
原文地址:http://www.cnblogs.com/luoxueyi/p/6845586.html