Announcement Announcement Module
Collapse
No announcement yet.
Set Splitter Channels Without XML Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Set Splitter Channels Without XML

    I am trying to replace as much XML Spring configuration with a Java config file annotated with @Configuration. Unfortunately, I have not been able to find a way to set a Splitter's input and output channel using Java. More specifically, I would like to replace:


    <splitter input-channel="feederChannel" output-channel="bufferInputChannel" ref="mySplitter" />


    With:


    @Bean
    MySplitter mySplitter() {
    MySplitter s = new MySplitter();
    // Do something here like s.setInputChannel(feederChannel), etc
    }


    Thanks!
    K

  • #2
    There is currently no first class support for configuring Spring Integration with @Configuration; sorry.

    You can minimize the xml in some cases, for example, using the @Splitter annotation and <int:annotation-config/> together with component scanning.

    You can do it with @Configuration but you would have to replicate all the bean definitions that, say, the SplitterParser and superclasses create.

    Comment

    Working...
    X