如果我在依赖项项目中有property-placeholder,则Mule esb凭证保险库无法识别属性文件

时间:2018-08-18 15:33:01

标签: mule

我有一个域项目,声明了securePropertyPlaceholderModule

myfun

和带有

的依赖项项目

<spring:beans>
    <spring:bean class="org.mule.modules.security.placeholder.SecurePropertyPlaceholderModule">
        <spring:property name="encryptionMode" value="CBC"/>
        <spring:property name="encryptionAlgorithm" value="AES"/>
        <spring:property name="location" value="credential-vault-domain-project2-${env}.properties,domain-project2-${env}.properties"/>
        <spring:property name="ignoreUnresolvablePlaceholders" value="true"/>
        <spring:property name="ignoreResourceNotFound" value="true"/>
        <spring:property name="key" value="${security-property-placeholder-key}"/>
    </spring:bean>
</spring:beans>

GET ::: http://localhost:8081/cv2

我得到了预期的结果

INFO 2018-08-18 15:32:01,679 [[credential-vault2] .HTTP_Listener_Configuration.worker.01] org.mule.api.processor.LoggerMessageProcessor:来自credentialvault属性文件的域项目值:: 5105105105105100

INFO 2018-08-18 15:32:01,679 [[credential-vault2] .HTTP_Listener_Configuration.worker.01] org.mule.api.processor.LoggerMessageProcessor:域项目属性文件::伦敦

但是,如果我在子项目中添加::: context:property-placeholder位置

无法识别并且无法显示域项目属性文件的值。

: :
      

<flow name="credential-vaul1Flow">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/cv2" doc:name="HTTP"/>

    <logger level="INFO" doc:name="DomainProject-credentialvault-Propertyfile" message="Domain projects value from credentialvault property file ::  ${CreditCardNumber}"/>
    <logger level="INFO" doc:name="DomainProject2-Propertyfile" message="Domain projects  property file ::  ${CityName}"/>

     <!--  <logger level="INFO" doc:name="credentialvaul2t-Propertyfile" message="credentialvault2 property file ::  ${County}"/> -->  

</flow>

错误消息

嵌套异常为java.lang.IllegalArgumentException:无法解析占位符'CreditCardNumber'

当我们在域项目中使用此SecurePropertyPlaceholderModule时,有人可以阐明如何在域项目中识别域项目属性文件以及子项目属性文件吗? 谢谢和问候 尼维

0 个答案:

没有答案