spring-dubbo.xml
1.37 KB
<?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:application name="manage" />
<!-- 使用multicast广播注册中心暴露服务地址 -->
<dubbo:registry id="zk" address="zookeeper://10.28.6.50:2181" />
<dubbo:registry id="wms" address="zookeeper://10.28.2.150:2181" />
<!-- 用dubbo协议在20880端口暴露服务 -->
<dubbo:protocol name="dubbo" port="20880" />
<!--<!– 声明需要暴露的服务接口 –> -->
<!--<dubbo:service interface="com.alibaba.dubbo.demo.DemoService" ref="demoService"
/> -->
<!-- 和本地bean一样实现服务 -->
<dubbo:reference id="siteService"
interface="com.xm.manweb.api.service.SiteService" registry="zk"
group="com.xm.manweb" timeout="3000" check="false" version="1.0.0" />
<dubbo:reference id="staticresourceProvider"
interface="com.diligrp.staticresource.provider.StaticresourceProvider"
registry="wms" version="1.0.0" check="false"></dubbo:reference>
</beans>