是否有某种方法可以获取已部署的 mule 应用程序的基本 mule 应用程序名称?
到目前为止我发现的仅有的两个选项是:
muleContext.getConfiguration().getId() //which gives me some not so humanly-readable id of some sort.
和
muleEvent.getFlowConstruct().getName() //gives me that flow name from where this was called.
每个应用程序在部署时都在自己的应用程序目录中,是否不可能从 muleContext 中获取这个或其他类似的专有名称?
亲切的问候
最佳答案
检索应用程序名称的最简单方法是使用 ${app.name}
spring 占位符将其注入(inject)到您的组件中
关于mule - 如何获取 mule 应用程序名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18314683/