dubbo 事件通知 学习 链接 : http://blog.csdn.net/u010317829/article/details/52152263
关键代码 :
<?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">
<!-- 指定web服务名字 -->
<dubbo:application name="DubboEven_ref"/>
<!-- 声明服务注册中心 -->
<dubbo:registry protocol="zookeeper" address="127.0.0.1:2181"/>
<dubbo:protocol name="dubbo" port="20881"/>
<!-- 暴露你的服务地址 -->
<dubbo:reference
id="dubboEvenService"
interface="com.yncp.dubbo.service.IDubboEvenService"
protocol="dubbo"
>
<dubbo:method name="methodInvoke"
onreturn="notify.onreturn"
onthrow="notify.onthrow"
/>
</dubbo:reference>
</beans>