spring-provider.xml 1011 B

12345678910111213141516171819202122
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
  5. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  6. http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
  7. <!-- 使用zookeeper广播注册中心暴露服务地址 -->
  8. <dubbo:registry protocol="zookeeper" address="10.104.0.190:2181,10.104.0.190:2181,10.104.0.190:2181" />
  9. <!-- 用dubbo协议在20880端口暴露服务 -->
  10. <dubbo:protocol name="dubbo" port="20880" />
  11. <!-- 声明需要暴露的服务接口 -->
  12. <dubbo:service interface="com.fsm.zgrsts.dubbo.service.AppComplaint" ref="AppComplaint"/>
  13. <!-- 和本地bean一样实现服务 -->
  14. <bean id="AppComplaint" class="com.fsm.zgrsts.dubbo.service.AppComplainImpl" />
  15. </beans>