Reputation: 4719
A Message object is passed to a service activator bean definition in XML as follows:
<int:service-activator>
<bean class="BatchWriter"
p:headerValue="...">
</bean>
</int:service-activator>
Within XML, what is the correct syntax to use to get a specific header value from the message and pass it as a parameter to the service activator bean?
Thanks
Upvotes: 0
Views: 861
Reputation: 121552
This should be enough for you:
class BatchWriter {
MyPojo2 service(MyPojo1 payload, @Header("foo") Object foo) {
....
}
}
So, the @Header
does the stuff.
Cheers
Upvotes: 1