Is there anyway to set value of spring integration header to bean property.
<int:header-enricher>
<int:header name="bId" expression="T(java.util.UUID).randomUUID()" />
</int:header-enricher>
Now in bean definition
<bean id="" class="">
<property name="bId" value="#{headers['bId']}" />
</bean>
This above code doesn't work. this throws exception
Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1008E:(pos 0): Property or field 'headers' cannot be found on object of type 'org.spri
ngframework.beans.factory.config.BeanExpressionContext' - maybe not public?
I tried below ways, they don't work
<bean id="" class="">
<property name="bId" value="headers['bId']" />
</bean>
<bean id="" class="">
<property name="bId" ref="headers['bId']" />
</bean>
Below would've been ideal, but this expression
is not available
<bean id="" class="">
<property name="bId" expression="headers['bId']" />
</bean>