【发布时间】:2012-04-08 08:36:49
【问题描述】:
我在看这篇文章
MULE lifecycle - how to hook into startup process
但我不知道如何将 xml 放入 mule-config.xml 文件中。我没有流、入站端点或出站端点。我只是有一个开始和停止的类,我需要在上面运行一些代码。这个骡子xml是什么?我找不到任何这样的例子。
谢谢, 院长
【问题讨论】:
标签: mule
我在看这篇文章
MULE lifecycle - how to hook into startup process
但我不知道如何将 xml 放入 mule-config.xml 文件中。我没有流、入站端点或出站端点。我只是有一个开始和停止的类,我需要在上面运行一些代码。这个骡子xml是什么?我找不到任何这样的例子。
谢谢, 院长
【问题讨论】:
标签: mule
试试这个:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spring="http://www.springframework.org/schema/beans"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd">
<spring:beans>
<spring:bean id="initializer" class="org.myclass.that.implements.muleContextNotificationListener.MuleContextNotification"/>
</spring:beans>
<notifications>
<notification event="CONTEXT"/>
<notification-listener ref="initializer"/>
</notifications>
</mule>
(灵感来自this)
【讨论】: