<?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="shop-manage-service" />
<!-- 定义注册中心 -->
<dubbo:registry address="${dubbo.register.server}" />
<!-- 协议端口中,每一个项目都必须要有独立的端口编号,默认20880 -->
<dubbo:protocol name="dubbo" port="20880" />
<!-- 接口要提供的服务 -->
<dubbo:service interface="com.wisezone.service.ItemService"
ref="itemServiceImpl" timeout="10000" />
<dubbo:service interface="com.wisezone.service.ItemCatService"
ref="itemCatServiceImpl" timeout="10000" />
<dubbo:service interface="com.wisezone.service.ItemDescService"
ref="itemDescServiceImpl" timeout="10000" />
</beans>
然后把它交个spring父容器applicationContext.xml管理
<import resource="classpath:spring-dubbo-provider.xml"/>