简体   繁体   English

访问Mule flow中的属性

[英]Accessing properties in Mule flow

How can we access loaded properties, which are loaded at Mule bootstrap, pro- grammatically from a Java class? 我们如何通过编程从Java类访问已加载的属性,这些属性是在Mule引导程序中加载的? To be more clear: 更清楚地说:

My Mule application will load some.properties file at bootstrap and will use these using the placeholder ${} inside a flow. 我的Mule应用程序将在引导程序中加载some.properties文件,并将在流中使用占位符$ {}使用这些文件。 My question is How can we access these loaded properties inside a Java class pro-grammatically? 我的问题是我们如何才能以编程方式访问Java类中的这些已加载属性?

Thanks in advance. 提前致谢。

There is no point on reading them programatically as you can get them injected . 以编程方式读取它们没有意义,因为您可以注入它们。

If you really want to, from the mule context, get the mule registry and from there just get the object . 如果您真的想从mule上下文中获取mule注册表,然后从那里获取object

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM