how can i define a simple bridge that just bridges from one directChannel to another with java annotations
in xml one can do it like this (taken from http://docs.spring.io/spring-integration/reference/html/messaging-channels-section.html)
<int:bridge input-channel="input" output-channel="output"/>
with annotations i would have expected the definition to look like something this
@Bean
@BridgeFrom("inboundChannel")
@BridgeTo("outboundChannel")
public MessageChannel bridge() {
return new DirectChannel();
}
but this gives me the error
IllegalArgumentException: '@BridgeFrom' is eligible only for 'MessageChannel' '@Bean' methods
any suggestions how i would translate the above xml-definition into a java-config-definition?