【发布时间】:2016-09-16 03:24:06
【问题描述】:
有没有办法在 Spring header-enricher 的 expression 字段的三元表达式中使用 spring 属性?看起来像这样的东西:
<int:header-enricher>
<int:header name="DESTINATION" expression="headers['DATA'].routingKey == 'ROUTE1' ? ${route1.db} : ${route2.db}"/>
</int:header-enricher>
这导致错误提示 Unexpected token. Expected 'colon(:)' but was 'lcurly({)'。也许我错过了什么。
【问题讨论】:
标签: java spring-integration spring-el spring-properties