如何动态指定配置引用?

How to specify a config-ref dynamically?

mule 中是否有动态指定配置引用的方法?

而不是:

<a:connector config-ref="the_config_name" other-properties="here" />

类似下面的内容?

<a:connector config-ref="#[flowVars.configName]" other-properties="here" />

这是必需的,因为所使用的配置具有一些不允许动态值的属性 (URL),因为它们是在 mule 应用程序启动时实例化的。

不,配置引用是静态的。相反,配置本身在 Mule 4 中可以是动态的。这需要对参数进行特殊处理,以便每个配置都可以重新实例化。 有关这方面的更多信息,您可以查看here.