Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/svn/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
mule-如何在启动mule时运行代码(服务器侦听器)_Mule - Fatal编程技术网

mule-如何在启动mule时运行代码(服务器侦听器)

mule-如何在启动mule时运行代码(服务器侦听器),mule,Mule,我正在读这篇文章 但我不知道如何将xml放入mule-config.xml文件中。我没有流、入站端点和出站端点。我只是有一个有开始和停止的类,我需要在它上面运行一些代码。mule xml的用途是什么?我找不到这样的例子 谢谢, 迪恩试试这个: <?xml version="1.0" encoding="UTF-8"?> <mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http:

我正在读这篇文章

但我不知道如何将xml放入mule-config.xml文件中。我没有流、入站端点和出站端点。我只是有一个有开始和停止的类,我需要在它上面运行一些代码。mule xml的用途是什么?我找不到这样的例子

谢谢, 迪恩

试试这个:

<?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>

(灵感来源)

试试这个:

<?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>

(灵感来源于)