What's Java config equivalent to following header enricher:-
<!-- Business Entity Header Enricher -->
<int:header-enricher
id="businessEntityHeaderEnricherComponent"
should-skip-nulls="false"
output-channel="notificationPreferencesInputChannel"
input-channel="newUserCreatedChannel">
<!-- Tenant -->
<int:header name="tenant"
<!-- !! HEADER ENRICHMENT ID DONE BY SPRING MANAGED BEAN !! -->
ref="businessEntityPayloadHeaderEnricher"
method="extractTenant" />
</int:header-enricher>
I have a Spring managed @Bean whose method (that return a Map) should take care of enriching the Message header.
I understand that I can also use spring-integration-dsl but as of now I need to stick to Java config.
For example, this is how I am using Java config to define a Service Activator:-
@Bean
@ServiceActivator(requiresReply = "false", inputChannel = "lifeCycleRouterChannel")
public InvoiceDelinquencyServiceActivator serviceActivator() {
return new InvoiceDelinquencyServiceActivator();
}
What's the equivalent way to define Header Enricher ? Couldn't find any example/reference.
Thanks.