在 tomcat 或 jetty 中部署 mule 应用程序时,如何将 configuration.xml 文件中的 http 端点更改为 servlet 端点?

While deploying mule application in tomcat or jetty , How to change http endpoints to servlet endpoints in configuration.xml file?

我尝试在 tomcat 和码头中部署基本的 mule 应用程序(使用 http 侦听器连接器),它 worked.Here 我将 http 的端点更改为 ...

<servlet:inbound-endpoint path="sample"/>
<set-payload value="Hello mule!"/>

但现在我正在尝试部署 mule 的其他应用程序,它使用内置的连接器,如 salesforce,我现在很困惑如何更改端点。

例如,这就是我的 config.xml 文件的样子。

我正在使用 mule 4.3。请 guide/help 我在这。提前致谢。

Mu​​le 流由 message source. ie a ´connector´ that receives a request or message and starts the flow execution. When deploying the Mule application in a servlet container like Tomcat usually you would intend to receive HTTP requests from the container rather than using Mule own HTTP connector. That's the reason to use the servlet endpoint 触发以将来自容器的请求映射到流。

使用嵌入式您会失去管理选项和一些功能。内置库管理都是手动的,因此容易出错。如果您没有充分的理由部署嵌入式,我强烈建议您独立使用 Mule。对于新项目,你应该真正使用 Mule 4.3,它是 Mule 的当前和现代版本。所有 Mule 3.x 版本都超出了标准支持期,在 EOL 之前不会有新的改进。

Mu​​le 3.x 中内置了一些连接器和端点(如 HTTP 或 SFTP 连接器),还有一些需要添加到项目中,如 Salesforce 或 SAP 连接器。如果您使用的是 Maven 项目,则需要添加连接器依赖项。

请注意,Salesforce 连接器要求您使用 Mule 的企业版,正如我提到的,Mule 3.x 目前的支持更为有限。