我计划在spring集成中使用控制总线功能来管理入站端点,即入站文件适配器,消息驱动适配器等。
为了使控制总线正常工作,必须使用适配器ID。我不想硬编码id。有没有办法列出所有入站适配器并获得Id?
答案 0 :(得分:0)
入站通道适配器由SourcePollingChannelAdapter
表示。所有消息驱动的渠道适配器均为MessageProducerSupport
或MessageGatewaySupport
。
您需要为所有提到的课程申请BeanFactory.getBeansForType()
。
如果您只打算处理Lifecycle
功能,请考虑使用常用的start()/stop()
界面。
还有RoleController
来管理生命周期组:http://docs.spring.io/spring-integration/docs/4.3.10.RELEASE/reference/html/messaging-endpoints-chapter.html#endpoint-roles