Spring集成DSL:如何以编程方式获取集成流的默认通道?
问题描述:
@Bean
public IntegrationFlow flow(){
return f->f
.handle(m ->{System.out.println(m);throw new RuntimeException("probleme");});
}
鉴于此流程,我怎样才能以编程方式获得默认通道(“flow.input”)?Spring集成DSL:如何以编程方式获取集成流的默认通道?
答
@Autowired
@Qualifier("flow.input")
private MessageChannel flowInputChannel;
或
MessageChannel flowInputChannel = applicationContext.getBean("flow.input", MessageChannel.class);