dubbo服务 && rpc
来源:互联网 发布:mac如何解压exe文件 编辑:程序博客网 时间:2024/06/08 02:11
官网:http://dubbo.io/
1.xml配置
(1)生产者:(下面该配置既是生产者也是消费者)
provider.xml
<?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="com.yiran.service.gin.api.GinApiApplicationContext" />
<dubbo:application name="项目名字" organization="dubbox"/>
<dubbo:registry address="${dubbo.registry.address}" />
<dubbo:protocol name="dubbo" port="${dubbo.protocol.port}" />
<!-- 扫描注解包路径,多个包用逗号分隔,不填pacakge表示扫描当前ApplicationContext中所有的类 -->
<dubbo:annotation package="包名" />
<dubbo:service interface="com.xxx.service.xxx.query.xxxService" ref="xxxServiceImpl" filter="Profiling">
<dubbo:method name="queryGoodsList">
<dubbo:argument index="1"/>
</dubbo:method>
<dubbo:method name="queryFavoriteGoodsInfoList"/>
<dubbo:method name="queryMallRecGoodsInfo"/>
</dubbo:service>
<!-- 生成远程服务代理,可以和本地bean一样使用demoService -->
<dubbo:reference id="xxxQueryService" interface="com.xxx.service.xxx.query.xxxQueryService" check="false">
</dubbo:reference>
</beans>
<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="com.yiran.service.gin.api.GinApiApplicationContext" />
<dubbo:application name="项目名字" organization="dubbox"/>
<dubbo:registry address="${dubbo.registry.address}" />
<dubbo:protocol name="dubbo" port="${dubbo.protocol.port}" />
<!-- 扫描注解包路径,多个包用逗号分隔,不填pacakge表示扫描当前ApplicationContext中所有的类 -->
<dubbo:annotation package="包名" />
<dubbo:service interface="com.xxx.service.xxx.query.xxxService" ref="xxxServiceImpl" filter="Profiling">
<dubbo:method name="queryGoodsList">
<dubbo:argument index="1"/>
</dubbo:method>
<dubbo:method name="queryFavoriteGoodsInfoList"/>
<dubbo:method name="queryMallRecGoodsInfo"/>
</dubbo:service>
<!-- 生成远程服务代理,可以和本地bean一样使用demoService -->
<dubbo:reference id="xxxQueryService" interface="com.xxx.service.xxx.query.xxxQueryService" check="false">
</dubbo:reference>
</beans>
0 0
- dubbo服务 && rpc
- dubbo rpc服务使用
- RPC实践(五)Dubbo实践-服务集群
- Dubbo源代码实现五:RPC中的服务消费方实现
- Docker+Spring+Dubbo+ZooKeeper完成服务化RPC实验
- dubbo的应用场景 RPC远程服务调用
- 自定义RPC通讯框架,实现dubbo远程RPC服务治理功能
- dubbo启动服务报错com.alibaba.dubbo.rpc.RpcException及Address already in use
- 模拟dubbo 框架RPC调用及dubbo的服务动态注册,服务路由,负载均衡功能的思考
- springboot 集成dubbo,RPC 远程调用服务接口:提示服务空指针异常
- dubbo本地模拟RPC
- RPC框架--Dubbo
- Dubbo RPC原理解读
- dubbo-rpc分析
- 服务化实战之 dubbo、dubbox、motan、thrift、grpc等RPC框架比较及选型
- RPC 服务框架 Dubbo 将正式得到官方维护与支持
- 服务化实战之 dubbo、dubbox、motan、thrift、grpc等RPC框架比较及选型
- 服务化实战之 dubbo、dubbox、motan、thrift、grpc等RPC框架比较及选型
- JDBC注册驱动程序三种方式
- angularjs2 外部设置组件header的属性(二)
- mysql 在线安装问题
- 文章标题
- spring使用PropertyPlaceholderConfigurer扩展来满足不同环境的参数配置
- dubbo服务 && rpc
- lineFit
- 递归二分查找。
- js-window.onload只能调用一次的问题!
- RMAN下CROSSCHECK命令详解
- Android-postDelayed()[创建多线程消息的函数]
- java中import,package的用法
- [LeetCode]Minimum Moves to Equal Array Elements II(Java)
- 学编程的 6 个技巧(学习方法总结)