<?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"
xmlns:context="http://www.springframework.org/schema/context"
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
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
">
<context:property-placeholder location="classpath:dubbo.properties" />
<!-- 消息提供者名称 -->
<dubbo:application name="shop-manage-web" />
<!-- 定义注册中心 -->
<dubbo:registry address="${dubbo.register.server}" />
<!-- 消费者要定义的实现接口 -->
<dubbo:reference id="itemCatService" check="false" interface="com.wisezone.service.ItemCatService"/>
<dubbo:reference id="itemService" check="false" interface="com.wisezone.service.ItemService"/>
<dubbo:reference id="itemDescService" check="false" interface="com.wisezone.service.ItemDescService"/>
<!-- 接口要提供的服务 -->
</beans>
然后他交给springMVC的配置文件管理
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-dubbo-consumer.xml</param-value>
</context-param>