Spring integration 无法访问spring集成路由器int:mapping值中的标头值

Spring integration 无法访问spring集成路由器int:mapping值中的标头值,spring-integration,Spring Integration,无法使用下面的方法访问路由器的value属性中的头 <int:router input-channel="route_profile" expression="#jsonPath(payload, '$.entity')"> <int:mapping value="headers.userId" channel="toWeb_send"/> <int:mapping value="headers.otherId" channel="

无法使用下面的方法访问路由器的value属性中的头

<int:router input-channel="route_profile"  expression="#jsonPath(payload, '$.entity')">
        <int:mapping value="headers.userId" channel="toWeb_send"/>
        <int:mapping value="headers.otherId" channel="find_preferences"/>
    </int:router>

我在这里做的任何事情都是错误的。

表达式不是该值属性中所期望的:

 <xsd:attribute name="value" type="xsd:string">
      <xsd:annotation>
          <xsd:documentation>
            A value of the evaluation token that will be mapped to a channel reference
            (e.g., mapping value='foo' channel='myChannel')
            </xsd:documentation>
        </xsd:annotation>
 </xsd:attribute>

如果这些头周围有一些逻辑,则必须将它们包括在表达式计算中。或者您可以选择其他方法来计算路由密钥。

我认为在这种情况下,我必须使用recipientlist路由器
<int:mapping value="foo" channel="toWeb_send"/>
<int:mapping value="bar" channel="find_preferences"/>