我正在寻找一种在运行时在 mule 流(Mule 3.3.0)中将异常消息分配给 spring 属性的方法
这就是我的代码片段的样子:
<catch-exception-strategy>
<logger message="----->Exception is #[exception.causeException]"
level="INFO" />
<custom-transformer
class="com.company.transformer.VelocityMessageTransformer">
<spring:property name="velocityEngine" ref="velocityEngine" />
<spring:property name="templateName" value="soap11Fault.vm" />
<spring:property name="beanClass">
<spring:bean parent="abstractSoap11ClientFault">
<spring:property name="faultString" value="Invalid Request" />
<spring:property name="detail" value="${exception.causeException}" />
</spring:bean>
</spring:property>
</custom-transformer>
</catch-exception-strategy>
我想在detail
这里为属性分配异常原因:
<spring:property name="detail" value="${exception.causeException}" />
但是 spring 正在属性文件中寻找这个属性。我也试过这样做
<spring:property name="detail" value="${#[exception.causeException]}" /> but doesn't work.
有没有办法在运行时将 Mule 表达式传递给 Spring 属性?