Changes between 5.5 and 6.0
New Components
添加了适用于集成流定义的 Groovy DSL 实现。有关更多详细信息,请参见 Groovy DSL。
A Groovy DSL implementation for integration flow definitions has been added. See Groovy DSL for more information.
MQTT ClientManager
已添加新的 MQTT ClientManager
以支持跨不同通道适配器的可重用 MQTT 连接。有关详细信息,请参阅 Shared MQTT Client Support。
A new MQTT ClientManager
has been added to support a reusable MQTT connection across different channel adapters.
See Shared MQTT Client Support for more information.
GraphQL Support
已添加 GraphQL 支持。有关更多详细信息,请参见 GraphQL Support。
The GraphQL support has been added. See GraphQL Support for more information.
Apache Camel Support
已引入对 Apache Camel 路由的支持。有关更多详细信息,请参见 Apache Camel Support。
Support for Apache Camel routes has been introduced. See Apache Camel Support for more information.
Hazelcast Support
Hazelcast Spring Integration Extensions 项目已迁移为 `spring-integration-hazelcast`模块。有关更多详细信息,请参见 Hazelcast Support。
The Hazelcast Spring Integration Extensions project has been migrated as the spring-integration-hazelcast
module.
See Hazelcast Support for more information.
SMB Support
已从 Spring Integration Extensions 项目添加了 SMB 支持。此模块还添加了 Java DSL(参见 `org.springframework.integration.smb.dsl.Smb`工厂)。已推出一个 `SmbStreamingMessageSource`和 `SmbOutboundGateway`实现。有关更多详细信息,请参见 SMB Support。
SMB support has been added from the Spring Integration Extensions project.
The Java DSL (see org.springframework.integration.smb.dsl.Smb
factory) also has been added to this module.
An SmbStreamingMessageSource
and SmbOutboundGateway
implementation are introduced.
See SMB Support for more information.
PostgreSQL Push Notification
PostgresSubscribableChannel
允许在将新消息添加到 JdbcChannelMessageStore
时通过 PostgresChannelMessageTableSubscriber
接收推送通知。
A PostgresSubscribableChannel
allows to receive push notifications via PostgresChannelMessageTableSubscriber
upon new messages add to the JdbcChannelMessageStore
.
有关详细信息,请参阅 PostgreSQL: Receiving Push Notifications。
See PostgreSQL: Receiving Push Notifications for more information.
RabbitMQ Stream Queue Support
AMQP 模块已得到增强,可使用 RabbitMQ 流队列提供对入站和出站通道适配器的支持。有关更多详细信息,请参见 RabbitMQ Stream Queue Support。
The AMQP module has been enhanced to provide support for inbound and outbound channel adapters using RabbitMQ Stream Queues. See RabbitMQ Stream Queue Support for more information.
Apache MINA SFTP
SFTP 模块已从过时的 JCraft JSch 库完全重新制作,成为 Apache MINA 项目的更强大、更现代的 org.apache.sshd:sshd-sftp
模块。
The SFTP modules has been fully reworked from outdated JCraft JSch library to more robust and modern org.apache.sshd:sshd-sftp
module of the Apache MINA project.
有关更多详细信息,请参见 SFTP Adapters。
See SFTP Adapters for more information.
Micrometer Observation
现在支持使用 Micrometer 启用计时器和跟踪观察。有关详细信息,请参阅 Micrometer Observation。
Enabling observation for timers and tracing using Micrometer is now supported. See Micrometer Observation for more information.
GraalVM Polyglot Support
基于 GraalVM Polyglot 支持,脚本模块现在提供一个 `PolyglotScriptExecutor`实现。自其 JSR223 实现被 Java 自行移除以来,JavaScript 支持现在基于此执行程序。有关更多详细信息,请参见 Scripting Support。
The Scripting module now provides a PolyglotScriptExecutor
implementation based on the GraalVM Polyglot support.
JavaScript support is now based on this executor since its JSR223 implementation has been removed from Java by itself.
See Scripting Support for more information.
Apache Cassandra Support
Apache Cassandra Spring Integration Extensions 项目已迁移为 `spring-integration-cassandra`模块。有关更多详细信息,请参见 Apache Cassandra Support。
The Apache Cassandra Spring Integration Extensions project has been migrated as the spring-integration-cassandra
module.
See Apache Cassandra Support for more information.
Kotlin Coroutines
已向框架中引入了 Kotlin 协程支持。
Kotlin Coroutines support has been introduced to the framework.
有关详细信息,请参阅 Kotlin Coroutines。
See Kotlin Coroutines for more information.
Native Images
提供了对创建 GraalVM 原生映像的支持。有关更多详细信息,请参见 Native Images Support。
Support for creating GraalVM native images is provided. See Native Images Support for more information.
General Changes
消息传递注释现在为 @Repeatable
,并且相同类型可以在同一服务方法上声明多次。消息传递注释不再将 poller
属性作为 @Poller
数组。
The messaging annotations are now @Repeatable
and the same type can be declared several times on the same service method.
The messaging annotations don’t require a poller
attribute as an array of @Poller
anymore.
有关更多详细信息,请参见 Annotation Support。
See Annotation Support for more information.
为方便起见,基于 RecipientListRouter
的 Scatter-Gather 的 XML 和 Java DSL 现在设置了 applySequence = true
,因此聚合器部分可以依赖于默认相关策略。
For convenience, the XML and Java DSL for Scatter-Gather, based on the RecipientListRouter
, now sets an applySequence = true
, so the gatherer part can rely on the default correlation strategies.
有关更多详细信息,请参见 Scatter-Gather。
See Scatter-Gather for more information.
AbstractMappingMessageRouter
已进行另一个方便的行为更改。现在,设置 defaultOutputChannel
还会将 channelKeyFallback
属性重置为 false
,因此不会尝试从其键解析通道,但逻辑会立即回退为将消息发送到 defaultOutputChannel
。
Another convenient behavior change has been made to the AbstractMappingMessageRouter
.
Now, setting a defaultOutputChannel
also resets the channelKeyFallback
property to false
, so no attempts will be made to resolve a channel from its key, but the logic immediately falls back to sending the message to the defaultOutputChannel
.
有关详细信息,请参阅 Router Options。
See Router Options for more information.
AggregatingMessageHandler
现在不会在输出上拆分 MessageGroupProcessor
(除非是 SimpleMessageGroupProcessor
)的 Collection<Message<?>>
结果,而是会发出一个单消息,其中包含整个集合作为有效负载。
The AggregatingMessageHandler
now does not split a Collection<Message<?>>
result of the MessageGroupProcessor
(unless it is a SimpleMessageGroupProcessor
) on the output, but emits a single message containing this whole collection as a payload.
有关详细信息,请参阅 Aggregator。
See Aggregator for more information.
IntegrationFlows
工厂现在已被标记为弃用,取而代之的是 IntegrationFlow
界面本身中提供的流畅 API。此工厂类将在未来版本中删除。
The IntegrationFlows
factory is now marked as deprecated in favor of the fluent API available in the IntegrationFlow
interface itself.
The factory class will be removed in the future releases.
有关详细信息,请参阅 Java DSL。
See Java DSL for more information.
从 Spring Framework“6.0”开始,org.springframework.util.concurrent.ListenableFuture
已被弃用。所有 Spring 集成异步 API 已迁移到 CompletableFuture
。
The org.springframework.util.concurrent.ListenableFuture
has been deprecated starting with Spring Framework 6.0
.
All Spring Integration async API has been migrated to the CompletableFuture
.
消息传递网关界面方法现在可以返回 Future<Void>
和 Mono<Void>
,并正确异步执行下游流程。
The Messaging Gateway interface method can now return Future<Void>
and Mono<Void>
with a proper asynchronous execution of the downstream flow.
除 @MessagingGateway
注释外,接口还可以用 @Primary
标记。
Alongside with a @MessagingGateway
annotation the interface can also be marked with a @Primary
.
@MessagingGateway
接口现在可用作用于配置的 @Import
资源。
@MessagingGateway
interfaces can now be use as an @Import
resources for configuration.
可以通过 @IntegrationComponentScan.nameGenerator()
属性定制网关代理 Bean 的默认命名策略。如果存在 AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR
Bean,在返回到 AnnotationBeanNameGenerator
之前,将在此之前协商。
The default naming strategy for gateway proxy beans can be customized via @IntegrationComponentScan.nameGenerator()
attribute.
If AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR
bean is present, it is consulted otherwise before falling back to the AnnotationBeanNameGenerator
.
有关更多详细信息,请参见 Messaging Gateway。
See Messaging Gateway for more information.
integrationGlobalProperties
Bean 现在由框架声明为 org.springframework.integration.context.IntegrationProperties
的实例,而不是以前弃用的 java.util.Properties
。
The integrationGlobalProperties
bean is now declared by the framework as an instance of org.springframework.integration.context.IntegrationProperties
instead of the previously deprecated java.util.Properties
.
如果查询没有返回任何记录,则生成集合作为答复的消息处理程序(例如,JpaOutboundGateway
、JdbcOutboundGateway
和其他基于数据库的网关)现在返回一个空结果列表。以前,会返回 null
以结束流程或引发异常,具体取决于 requiresReply
。
Message handlers which produce a collection as a reply (e.g. JpaOutboundGateway
, JdbcOutboundGateway
and other DB-based gateways) now return an empty result list if no records are returned by the query.
Previously, null
was returned ending the flow, or throwing an exception, depending on requiresReply
.
RMI Removal
在以前版本中弃用后,spring-integration-rmi
模块已被完全删除。没有替代品:建议迁移到更安全的网络和应用协议,例如 WebSockets、RSockets、gRPC 或 REST。
The spring-integration-rmi
module has been removed altogether after being deprecated in previous versions.
There is no replacement: it is recommended to migrate to more secure network and application protocols, such as WebSockets, RSockets, gRPC or REST.
GemFire Removal
由于 Spring Data 2022.0.0
不支持 VMware GemFire 或 Apache Geode,因此 spring-integration-gemfire
模块已完全删除。
The spring-integration-gemfire
module has been removed altogether since there is no Spring Data 2022.0.0
support for VMware GemFire or Apache Geode.
HTTP Changes
在 HttpRequestHandlingEndpointSupport
中公开的用于表达式求值上下文的 #cookies
变量现在是 MultiValueMap
用于承载客户端设置的所有 cookie 值。有关详细信息,请参阅 HTTP Support。
The #cookies
variable for expression evaluation context, exposed in the HttpRequestHandlingEndpointSupport
, is now a MultiValueMap
to carry all the values for cookies set by the client.
See HTTP Support for more information.
Apache Kafka Changes
如果在入站网关或消息驱动通道适配器上提供 RetryTemplate
,并且还提供了 errorChannel
,则自动配置 ErrorMessageSendingRecoverer
。
When providing a RetryTemplate
on the inbound gateway or message-driven channel adapter, if an errorChannel
is also provided, an ErrorMessageSendingRecoverer
is automatically configured.
此外,还提供了新的 KafkaErrorMessageSendingRecoverer
;这可与 DefaultErrorHandler
一起使用,以避免因长时间聚合的重试延迟导致分区重新平衡的问题。
In addition, the new KafkaErrorMessageSendingRecoverer
is provided; this can be used with a DefaultErrorHandler
to avoid issues with long aggregated retry delays causing partitions rebalances.
有关更多信息,请参见 Spring for Apache Kafka Support。
See Spring for Apache Kafka Support for more information.
JDBC Changes
现在可以向 DefaultLockRepository
提供 PlatformTransactionManager
,而不是依赖于来自应用程序上下文的首要 Bean。
The DefaultLockRepository
can now be supplied with a PlatformTransactionManager
instead of relying on the primary bean from the application context.
有关详细信息,请参阅 JDBC Lock Registry。
See JDBC Lock Registry for more information.
TCP/IP Changes
现在,默认情况下,AbstractConnectionFactory
和 DatagramPacketMessageMapper
的 lookupHost
属性设置为 false
,以避免在未配置 DNS 的环境中出现延迟。
The lookupHost
property of the AbstractConnectionFactory
and DatagramPacketMessageMapper
is now set to false
by default to avoid delays in the environments where DNS is not configured.
有关更多信息,请参见TCP and UDP Support。
See TCP and UDP Support for more information.
JMS Changes
如果 replyPubSubDomain
选项设为 true
,则 JmsOutboundGateway
现在会创建 TemporaryTopic
,而不是 TemporaryQueue
。
The JmsOutboundGateway
now creates a TemporaryTopic
instead of TemporaryQueue
if replyPubSubDomain
option is set to true
.
有关更多信息,请参见 JMS Support。
See JMS Support for more information.
Security Changes
已弃用 ChannelSecurityInterceptor
及其注释 @SecuredChannel
和 XML <secured-channels>
配置,转而采用 AuthorizationChannelInterceptor
。
The ChannelSecurityInterceptor
and its annotation @SecuredChannel
and XML <secured-channels>
configurations have been deprecated in favor of AuthorizationChannelInterceptor
.
有关详细信息,请参阅 Security Support。
See Security Support for more information.
Webflux Request Attributes Support
已为 WebFluxRequestExecutingMessageHandler
添加了 WebClient 请求属性支持。
Webclient Request attributes support has been added for WebFluxRequestExecutingMessageHandler
.
有关详细信息,请参阅 WebFlux Request Attributes。
See WebFlux Request Attributes for more information.