<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xmlns="http://www.springframework.org/schema/beans"
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:application name="bwton-travel-service"/>
<!--搞一个注册中心,以后可以支持多注册中心-->
<dubbo:registry id="businessRegistry" protocol="zookeeper" address="${dubbo.zk.address}"/>
<!--dubbo的本地监听端口,如果一台服务器上启动多个,可以修改该配置后再次启动-->
<dubbo:protocol name="dubbo" port="${dubbo.local.port}" threads="500"/>
<!--超时和重试次数,使用自定义的异常拦截器,使得能够传递BusinessException-->
<dubbo:provider filter="TraceFilter,default,-exception,BwtonExceptionFilter" timeout="${dubbo.timeout}" retries="0"/>
<dubbo:consumer filter="TraceFilter,default"/>
<!--引入所有provider-->
<import resource="classpath*:dubbo/dubbo-service-provider-*.xml"/>
<!--引入所有consumer-->
<import resource="classpath*:dubbo/dubbo-service-consumer-*.xml"/>
<!--支付系统是自己的zk注册中心-->
<dubbo:registry id="payRegistry"
protocol="zookeeper"
address="${dubbo.pay.registry.address}"
default="false"/>
</beans>
网友评论