此版本仍在开发中,尚未被视为稳定版本。对于最新的稳定版本,请使用 Spring Integration 6.3.1

此版本仍在开发中,尚未被视为稳定版本。对于最新的稳定版本,请使用 Spring Integration 6.3.1

从版本 5.3 开始,操作员允许在流中以当前值注册一个或多个实例。 这是通过 API 创建显式内容的替代方法。 以下示例使用 a 拒绝某些消息,但有例外:intercept()ChannelInterceptorMessageChannelMessageChannelMessageChannelsMessageSelectingInterceptor

.transform(...)
.intercept(new MessageSelectingInterceptor(m -> m.getPayload().isValid()))
.handle(...)