How to declare reusable transformer in XML without 'input-channel'?
2
In my application I would like to re-use the same message transformer inside of multiple <int:chain> . In such chains I perform http requests to different endpoints and I need to add the same basic authentication header. I would like to declare the code for adding a header only once, i.e: <int:header-enricher id="authHeaderAdder"> <int:header expression="'Basic ' + new String(T(java.util.Base64).encoder.encode(('${http.user}' + ':' + '${http.password}').bytes))" name="Authorization"/> </int:header-enricher> And then I would like to use it with ref in my chain before making http request: <int:chain input-channel="someHttpChain"> <int:transformer ref="authHeaderAdder...
