【问题标题】:how can we inject properties into wso2 integration studio using file.properties?我们如何使用 file.properties 将属性注入 wso2 集成工作室?
【发布时间】:2022-12-12 22:04:58
【问题描述】:

想在不使用 integration studio 的情况下在另一台服务器上使用 .car 文件。所以我希望能够使用配置文件动态更改主机名和端口。我的端点 url 中有变量 {uri.var.x} 这就是为什么我不能使用 $FILE:x 从 file.properties 获取完整的 url..

我已经尝试过 https://stackoverflow.com/questions/66218927/how-to-read-a-property-injected-from-file-properties-in-wso2-micro-integrator 但它没有用。

【问题讨论】:

    标签: properties wso2 configuration-files wso2-enterprise-integrator wso2-integration-studio


    【解决方案1】:

    您可以简单地从文件中读取属性并将其分配给您想要的变量。在您的端点配置中看到它。

    <property expression="get-property('file', 'x')" name="uri.var.x"/>
    

    【讨论】:

    • 我们不需要使用文件路径或其他东西吗?假设它在 MI_HOME/conf 中?
    猜你喜欢
    • 1970-01-01
    • 2021-03-03
    • 2021-09-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多