06.基于IDEA+Spring+Maven搭建测试项目--dubbo-consumer.xml配置

时间:2023-11-22 09:31:02
 <?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"
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"> <dubbo:consumer check="false"/> <!-- 提供方应用信息,用于计算依赖关系 -->
<dubbo:application name="test-ma-consumer"/> <!-- 使用zookeeper广播注册中心暴露服务地址 -->
<dubbo:registry protocol="zookeeper" address="zookeeper://${zookeeper.url}"/> <!-- 端口 -1 由注册中心自动分配端口-->
<dubbo:protocol name="dubbo" port="-1"/> <!-- 商户银行关系密钥表服务 -->
<dubbo:reference interface="com.ht.ma.query.facade.MemberBankKeyService"
id="memberBankKeyServiceImpl"
timeout="3000"
retries="0"/> </beans>

详细搭建过程参考:https://www.cnblogs.com/xiuxingzhe/p/9250737.html