Hello,
I'm not a fan of XML files, but I love the Spring integration graph that STS shows you. Besides, I'm used to configuring Spring applications with XML from the very first releases.
However, I also loves the component scan and auto-wired features of Spring using annotations.
Thus, I'm configuring a Spring integration application with XML files, BUT I'm also using Spring integration annotations. Mainly to load beans (using @Component), but also for documentation purposes (for instance, to point that a method is a @ServiceActivator or a @splitter).
I'm configuring neither inputChannel nor outputChannel, because I'm relying in the XML file for that.
For instance, a splitter:
Being:HTML Code:<int:splitter id="mySplitter" input-channel="inputChannel" output-channel="outputChannel" ref="requestSplitter" method="splitRequests" />
For the time being I don't have any problems with all this stuff, but I wonder, is there any known problems with this approach?Code:@Component public class RequestSplitter { @Splitter public List<Item> splitRequests(List<Request> requests) { //TODO: fill the list return new ArrayList<Item>(); } }


Reply With Quote