Changes between 4.3 and 5.0

请参见 Migration Guide 了解可能影响您应用程序的重要更改。您可以在 wiki 上找到从 2.1 返回的所有版本的迁移指南。

See the Migration Guide for important changes that might affect your applications. You can find migration guides for all versions back to 2.1 on the wiki.

New Components

版本 5.0 添加了许多新组件。

Version 5.0 added a number of new components.

Java DSL

单独的 Spring Integration Java DSL 现已合并到核心 Spring Integration 项目中。IntegrationComponentSpec 通道适配器和网关的实现分配给它们各自的模块。有关 Java DSL 支持的更多信息,请参见 Java DSL。另请参阅 4.3 to 5.0 Migration Guide 中关于迁移到 Spring Integration 5.0 所需步骤的信息。

The separate Spring Integration Java DSL project has now been merged into the core Spring Integration project. The IntegrationComponentSpec implementations for channel adapters and gateways are distributed to their specific modules. See Java DSL for more information about Java DSL support. See also the 4.3 to 5.0 Migration Guide for the required steps to move to Spring Integration 5.0.

Testing Support

我们创建了一个新的 Spring Integration 测试框架来帮助测试 Spring Integration 应用程序。现在,借助测试类上的 @SpringIntegrationTest 注解和 MockIntegration 工厂,你可以让用于集成流的 JUnit 测试变得更容易。

We created a new Spring Integration Test Framework to help with testing Spring Integration applications. Now, with the @SpringIntegrationTest annotation on test classes and the MockIntegration factory, you can make your JUnit tests for integration flows somewhat easier.

有关更多信息,请参阅 Testing support

See Testing support for more information.

MongoDB Outbound Gateway

新的 MongoDbOutboundGateway 允许你通过向其请求通道发送消息,按需对数据库进行查询。

The new MongoDbOutboundGateway lets you make queries to the database on demand by sending a message to its request channel.

有关更多信息,请参见 MongoDB Outbound Gateway

See MongoDB Outbound Gateway for more information.

WebFlux Gateways and Channel Adapters

我们为 Spring WebFlux 框架网关和通道适配器引入了新的 WebFlux 支持模块。

We introduced the new WebFlux support module for Spring WebFlux Framework gateways and channel adapters.

有关更多信息,请参阅 WebFlux Support

See WebFlux Support for more information.

Content Type Conversion

现在我们为服务方法调用使用基于 InvocableHandlerMethod 的新基础设施,我们可以从有效负载执行 contentType 转换到目标方法参数。

Now that we use the new InvocableHandlerMethod-based infrastructure for service method invocations, we can perform contentType conversion from the payload to a target method argument.

有关更多信息,请参见 Content Type Conversion

See Content Type Conversion for more information.

ErrorMessagePublisher and ErrorMessageStrategy

我们添加了 ErrorMessagePublisherErrorMessageStrategy 以创建 ErrorMessage 实例。

We added ErrorMessagePublisher and the ErrorMessageStrategy for creating ErrorMessage instances.

有关更多信息,请参见 Error Handling

See Error Handling for more information.

JDBC Metadata Store

我们为 MetadataStore 实现添加了 JDBC 实现。当您需要确保元数据的交易边界时,它非常有用。

We added a JDBC implementation of the MetadataStore implementation. This is useful when you need to ensure transactional boundaries for metadata.

有关更多信息,请参见 JDBC Metadata Store

See JDBC Metadata Store for more information.

General Changes

现在,Spring Integration 完全基于 Spring Framework 5.0 和 Project Reactor 3.1。不再支持以前版本的 Project Reactor。

Spring Integration is now fully based on Spring Framework 5.0 and Project Reactor 3.1. Previous Project Reactor versions are no longer supported.

Core Changes

对于 @Poller 注释,现在提供了 errorChannel 属性,以便更轻松地配置底层的 MessagePublishingErrorHandler。有关更多信息,请参阅 Annotation Support

The @Poller annotation now has the errorChannel attribute for easier configuration of the underlying MessagePublishingErrorHandler. See Annotation Support for more information.

所有基于 AbstractReplyProducingMessageHandler 的请求应答端点现在都可以启动事务,因此,可以使整个下游流具有事务性。有关更多信息,请参阅 Transaction Support

All the request-reply endpoints (based on AbstractReplyProducingMessageHandler) can now start transactions and, therefore, make the whole downstream flow transactional. See Transaction Support for more information.

SmartLifecycleRoleController 现在提供获取角色中端点状态的方法。有关更多信息,请参见 Endpoint Roles

The SmartLifecycleRoleController now provides methods to obtain status of endpoints in roles. See Endpoint Roles for more information.

现在,默认情况下,POJO 方法将使用 InvocableHandlerMethod 进行调用,但您可以将其配置为像以前一样使用 SpEL。有关详细信息,请参阅 POJO Method invocation

By default, POJO methods are now invoked by using an InvocableHandlerMethod, but you can configure them to use SpEL, as before. See POJO Method invocation for more information.

当针对 POJO 方法作为消息处理程序时,您现在可以用 @Default 注释标记其中一个服务方法,以提供非匹配条件的回调机制。有关详细信息,请参阅 Configuring Service Activator

When targeting POJO methods as message handlers, you can now mark one of the service methods with the @Default annotation to provide a fallback mechanism for non-matched conditions. See Configuring Service Activator for more information.

我们增加了一个简单的 PassThroughTransactionSynchronizationFactory 来始终将轮询消息存储在当前事务上下文中。该消息用作包装事务完成期间引发的任何原始异常的 MessagingExceptionfailedMessage 属性。有关详细信息,请参阅 Transaction Synchronization

We added a simple PassThroughTransactionSynchronizationFactory to always store a polled message in the current transaction context. That message is used as a failedMessage property of the MessagingException, which wraps any raw exception thrown during transaction completion. See Transaction Synchronization for more information.

基于聚合器表达式的 ReleaseStrategy 现在针对 MessageGroup 而不是仅仅针对 Message<?> 的集合来估算表达式。有关详细信息,请参阅 Aggregators and Spring Expression Language (SpEL)

The aggregator expression-based ReleaseStrategy now evaluates the expression against the MessageGroup instead of just the collection of Message<?>. See Aggregators and Spring Expression Language (SpEL) for more information.

现在,您可以为 ObjectToMapTransformer 提供自定义的 JsonObjectMapper

You can now supply the ObjectToMapTransformer with a customized JsonObjectMapper.

有关详细信息,请参阅 Aggregators and Spring Expression Language (SpEL)

@GlobalChannelInterceptor 注释和 <int:channel-interceptor> 现在支持用于组件名称匹配的否定模式(通过在前面添加 !)。有关详细信息,请参阅 Global Channel Interceptor Configuration

The @GlobalChannelInterceptor annotation and <int:channel-interceptor> now support negative patterns (via ! prepending) for component names matching. See Global Channel Interceptor Configuration for more information.

当候选对象未能获取锁定时,LockRegistryLeaderInitiator 将通过 DefaultLeaderEventPublisher 发射一个新的 OnFailedToAcquireMutexEvent。有关详细信息,请参阅 Leadership Event Handling

When a candidate failed to acquire the lock, the LockRegistryLeaderInitiator now emits a new OnFailedToAcquireMutexEvent through DefaultLeaderEventPublisher. See Leadership Event Handling for more information.

Gateway Changes

当网关方法具有 void 返回类型且提供错误通道时,现在网关可以正确设置 errorChannel 头。之前该头没有填充。这导致同步下游流(在调用线程上运行)将异常发送到已配置的通道,而异步下游流上的异常将被发送到默认的 errorChannel

When the gateway method has a void return type and an error channel is provided, the gateway now correctly sets the errorChannel header. Previously, the header was not populated. This caused synchronous downstream flows (running on the calling thread) to send the exception to the configured channel, but an exception on an asynchronous downstream flow would be sent to the default errorChannel instead.

RequestReplyExchanger 接口现在具有 throws MessagingException 从句,以满足建议的消息交换约定。

The RequestReplyExchanger interface now has a throws MessagingException clause to meet the proposed messages exchange contract.

你现在可以使用 SpEL 表达式指定请求和应答超时。有关更多信息,请参阅 Messaging Gateways

You can now specify the request and reply timeouts with SpEL expressions. See Messaging Gateways for more information.

Aggregator Performance Changes

现在,聚合器默认使用 SimpleSequenceSizeReleaseStrategy,这种方式更高效,尤其是在处理大型组时。现在,计划在 empty-group-min-timeout 后删除空组。有关详细信息,请参阅 Aggregator

By default, aggregators now use a SimpleSequenceSizeReleaseStrategy, which is more efficient, especially with large groups. Empty groups are now scheduled for removal after empty-group-min-timeout. See Aggregator for more information.

Splitter Changes

拆分器组件现在可以处理和拆分Java Stream`和Reactive Streams `Publisher`对象。如果输出通道是`ReactiveStreamsSubscribableChannel,则`AbstractMessageSplitter`为后续迭代构建`Flux`,而不是常规`Iterator`,与被拆分的对象无关。此外,`AbstractMessageSplitter`提供了`protected obtainSizeIfPossible()`方法来判断`Iterable`和`Iterator`对象的大小,如果可能的话。有关更多信息,请参见Splitter

The splitter component can now handle and split Java Stream and Reactive Streams Publisher objects. If the output channel is a ReactiveStreamsSubscribableChannel, the AbstractMessageSplitter builds a Flux for subsequent iteration instead of a regular Iterator, independent of the object being split. In addition, AbstractMessageSplitter provides protected obtainSizeIfPossible() methods to allow determination of the size of the Iterable and Iterator objects, if that is possible. See Splitter for more information.

JMS Changes

以前,Spring Integration JMS XML 配置为 JMS 连接工厂使用默认的 bean 名称 connectionFactory,允许在组件定义中省略该属性。我们将其重命名为 jmsConnectionFactory,这是 Spring Boot 在自动配置 JMS 连接工厂 bean 时使用的 bean 名称。

Previously, Spring Integration JMS XML configuration used a default bean name of connectionFactory for the JMS connection factory, letting the property be omitted from component definitions. We renamed it to jmsConnectionFactory, which is the bean name used by Spring Boot to auto-configure the JMS connection factory bean.

如果您的应用程序依赖于先前的行为,则可以将您的`connectionFactory`bean重命名为`jmsConnectionFactory`或使用其当前名称专门配置您的组件以使用您的bean。有关更多信息,请参见JMS Support

If your application relies on the previous behavior, you can rename your connectionFactory bean to jmsConnectionFactory or specifically configure your components to use your bean by using its current name. See JMS Support for more information.

Mail Changes

一些 IMAP 邮件内容渲染的不一致问题已经得到解决。有关更多信息,请参阅 xref:mail.adoc#imap-format-important[the note in the “Mail-receiving Channel Adapter” 部分。

Some inconsistencies with rendering IMAP mail content have been resolved. See the note in the “Mail-receiving Channel Adapter” section for more information.

Feed Changes

我们引入了`FeedEntryMessageSource`的新`Resource`属性,替代了ROME中已弃用的`com.rometools.fetcher.FeedFetcher`。有关更多信息,请参见Feed Adapter

Instead of the com.rometools.fetcher.FeedFetcher, which is deprecated in ROME, we introduced a new Resource property for the FeedEntryMessageSource. See Feed Adapter for more information.

File Changes

我们引入了新的 FileHeaders.RELATIVE_PATH 消息头,用于在 FileReadingMessageSource 中表示相对路径。

We introduced the new FileHeaders.RELATIVE_PATH message header to represent relative path in FileReadingMessageSource.

现在,尾适配器支持 idleEventInterval,以便在该期间文件中没有数据时发出事件。

The tail adapter now supports idleEventInterval to emit events when there is no data in the file during that period.

FileWritingMessageHandler 的刷新谓词现在有一个附加参数。

The flush predicates for the FileWritingMessageHandler now have an additional parameter.

文件出站通道适配器和网关 (FileWritingMessageHandler) 现在支持 REPLACE_IF_MODIFIED FileExistsMode。

The file outbound channel adapter and gateway (FileWritingMessageHandler) now support the REPLACE_IF_MODIFIED FileExistsMode.

它们现在还支持对新写入文件设置文件权限。

They also now support setting file permissions on the newly written file.

现在可以使用新的 FileSystemMarkerFilePresentFileListFilter。有关详细信息,请参阅 Dealing With Incomplete Data

A new FileSystemMarkerFilePresentFileListFilter is now available. See Dealing With Incomplete Data for more information.

FileSplitter 现在提供了一个 firstLineAsHeader 选项,以便将第一行内容作为标题添加到为剩余行发出的消息中。

The FileSplitter now provides a firstLineAsHeader option to carry the first line of content as a header in the messages emitted for the remaining lines.

有关更多信息,请参见 File Support

See File Support for more information.

FTP and SFTP Changes

入站通道适配器现在有一个名为 max-fetch-size 的属性,此属性用于在本地目录中当前没有文件时限制轮询期间获取的文件数量。默认情况下,它们还使用 local-filter 中的 FileSystemPersistentAcceptOnceFileListFilter 进行配置。

The inbound channel adapters now have a property called max-fetch-size, which is used to limit the number of files fetched during a poll when no files are currently in the local directory. By default, they also are configured with a FileSystemPersistentAcceptOnceFileListFilter in the local-filter.

此外,可以通过设置新引入的 scanner 属性为入站通道适配器提供自定义 DirectoryScanner 实现。

You can also provide a custom DirectoryScanner implementation to inbound channel adapters by setting the newly introduced scanner attribute.

现在,您可以将正则表达式和模式过滤器配置为始终传递目录。当您在出站网关中使用递归时,此功能非常有用。

You can now configure the regex and pattern filters to always pass directories. This can be useful when you use recursion in the outbound gateways.

默认情况下,现在所有入站通道适配器(基于流和基于同步)都使用适当的 AbstractPersistentAcceptOnceFileListFilter 实现来防止远程文件重复下载。

By default, all the inbound channel adapters (streaming and synchronization-based) now use an appropriate AbstractPersistentAcceptOnceFileListFilter implementation to prevent duplicate downloads of remote files.

现在,FTP 和 SFTP 出站网关在获取远程文件时支持 REPLACE_IF_MODIFIED FileExistsMode。

The FTP and SFTP outbound gateways now support the REPLACE_IF_MODIFIED FileExistsMode when fetching remote files.

现在,FTP 和 SFTP 流入站通道适配器在消息头中添加远程文件信息。

The FTP and SFTP streaming inbound channel adapters now add remote file information in a message header.

FTP 和 SFTP 外出通道适配器(还有 outbound 网关的 PUT 命令)现在也支持 InputStream 作为 payload

The FTP and SFTP outbound channel adapters (as well as the PUT command for outbound gateways) now support InputStream as payload, too.

入站通道适配器现在可以使用新引入的`RecursiveDirectoryScanner`在本地构建文件树。有关注入,请查看FTP Inbound Channel Adapter部分中的`scanner`选项。另外,您现在可以将这些适配器切换到`WatchService`。

The inbound channel adapters can now build file trees locally by using a newly introduced RecursiveDirectoryScanner. See the scanner option in the FTP Inbound Channel Adapter section for injection. Also, you can now switch these adapters to the WatchService instead.

我们向 AbstractRemoteFileOutboundGateway 添加了 NLST 命令来执行远程命令列出文件名称。

We added The NLST command to the AbstractRemoteFileOutboundGateway to perform the list files names remote command.

你现在可以通过 workingDirExpressionFtpOutboundGateway 提供,以更改当前请求消息的 FTP 客户端工作目录。

You can now supply the FtpOutboundGateway with workingDirExpression to change the FTP client working directory for the current request message.

RemoteFileTemplate 现在随 invoke(OperationsCallback<F, T> action) 一起提供,以便在相同线程绑定的 Session 的范围内执行多个 RemoteFileOperations 调用。

The RemoteFileTemplate is supplied now with the invoke(OperationsCallback<F, T> action) to perform several RemoteFileOperations calls in the scope of the same, thread-bounded, Session.

我们添加了用于检测不完整远程文件的新过滤器。

We added new filters for detecting incomplete remote files.

FtpOutboundGatewaySftpOutboundGateway 现在支持通过使用 GETMGET 命令在成功传输之后删除远程文件的一个选项。

The FtpOutboundGateway and SftpOutboundGateway now support an option to remove the remote file after a successful transfer by using the GET or MGET commands.

有关更多信息,请参见FTP/FTPS AdaptersSFTP Adapters

See FTP/FTPS Adapters and SFTP Adapters for more information.

Integration Properties

4.3.2版本添加了一个新的`spring.integration.readOnly.headers`全局属性,允许您自定义`MessageBuilder`向新创建的`Message`中复制的标头列表。有关更多信息,请参见Global Properties

Version 4.3.2 added a new spring.integration.readOnly.headers global property to let you customize the list of headers that should not be copied to a newly created Message by the MessageBuilder. See Global Properties for more information.

Stream Changes

我们在 CharacterStreamReadingMessageSource 中增加了一个新的选项,使之能够用于 “pipe” stdin,并在管道关闭时发布一个应用程序事件。有关详细信息,请参阅 Reading from Streams

We added a new option on the CharacterStreamReadingMessageSource to let it be used to “pipe” stdin and publish an application event when the pipe is closed. See Reading from Streams for more information.

Barrier Changes

`BarrierMessageHandler`现在支持一个丢弃通道,迟到的触发消息会发送到该通道。有关更多信息,请参见Thread Barrier

The BarrierMessageHandler now supports a discard channel to which late-arriving trigger messages are sent. See Thread Barrier for more information.

AMQP Changes

AMQP 出站端点现在支持在你使用 RabbitMQ Delayed Message Exchange 插件时设置一个延迟表达式。

The AMQP outbound endpoints now support setting a delay expression when you use the RabbitMQ Delayed Message Exchange plugin.

入站端点现在支持 Spring AMQP DirectMessageListenerContainer

The inbound endpoints now support the Spring AMQP DirectMessageListenerContainer.

现在,可轮询的 AMQP 后备通道会阻塞轮询线程的轮询器已配置 receiveTimeout(默认值:一秒)。

Pollable AMQP-backed channels now block the poller thread for the poller’s configured receiveTimeout (default: one second).

消息转换器添加到的消息属性的标头(如`contentType`)现在用于最终消息中。之前,它取决于转换类型,最终消息中会显示哪些标头和消息属性。若要覆盖转换器设置的标头,请将`headersMappedLast`属性设置为`true`。有关更多信息,请参见AMQP Support

Headers, such as contentType, that are added to message properties by the message converter are now used in the final message. Previously, it depended on the converter type as to which headers and message properties appeared in the final message. To override the headers set by the converter, set the headersMappedLast property to true. See AMQP Support for more information.

HTTP Changes

默认情况下,DefaultHttpHeaderMapper.userDefinedHeaderPrefix`属性现在是一个空字符串,而不是`X-。有关更多信息,请参见HTTP Header Mappings

By default, the DefaultHttpHeaderMapper.userDefinedHeaderPrefix property is now an empty string instead of X-. See HTTP Header Mappings for more information.

默认情况下,uriVariablesExpression 现在使用 SimpleEvaluationContext(自 5.0.4 起)。

By default, uriVariablesExpression now uses a SimpleEvaluationContext (since 5.0.4).

有关详细信息,请参阅 Mapping URI Variables

See Mapping URI Variables for more information.

MQTT Changes

现在,入站消息使用 RECEIVED_TOPICRECEIVED_QOSRECEIVED_RETAINED 标题进行映射,以避免应用程序中继消息时无意传播到出站消息。

Inbound messages are now mapped with the RECEIVED_TOPIC, RECEIVED_QOS, and RECEIVED_RETAINED headers to avoid inadvertent propagation to outbound messages when an application relays messages.

出站通道适配器现在支持主题、qos和保留属性的表达式。默认值保持不变。有关更多信息,请参见MQTT Support

The outbound channel adapter now supports expressions for the topic, qos, and retained properties. The defaults remain the same. See MQTT Support for more information.

STOMP Changes

我们更改了STOMP模块以使用基于Project Reactor 3.1`和`reactor-netty`扩展的`ReactorNettyTcpStompClient。根据`ReactorNettyTcpStompClient`基础,我们将`Reactor2TcpStompSessionManager`重命名为`ReactorNettyTcpStompSessionManager`。有关更多信息,请参见STOMP Support

We changed the STOMP module to use ReactorNettyTcpStompClient, based on the Project Reactor 3.1 and reactor-netty extension. We renamed Reactor2TcpStompSessionManager to ReactorNettyTcpStompSessionManager, according to the ReactorNettyTcpStompClient foundation. See STOMP Support for more information.

Web Services Changes

现在,您可以使用外部配置的 WebServiceTemplate 实例提供 WebServiceOutboundGateway 实例。

You can now supply WebServiceOutboundGateway instances with an externally configured WebServiceTemplate instances.

DefaultSoapHeaderMapper 现在可以将 javax.xml.transform.Source 用户定义标头映射到 SOAP 标头元素。

DefaultSoapHeaderMapper can now map a javax.xml.transform.Source user-defined header to a SOAP header element.

简单的 WebService 入站和出站网关现在可以将完整的 WebServiceMessage 处理为 payload,从而允许操作 MTOM 附件。

Simple WebService inbound and outbound gateways can now deal with the complete WebServiceMessage as a payload, allowing the manipulation of MTOM attachments.

有关更多信息,请参见Web Services Support

See Web Services Support for more information.

Redis Changes

现在提供了 RedisStoreWritingMessageHandler 以及额外的基于 String 的 SpEL 表达式设置程序(便于使用 Java 配置)。您现在还可以在 RedisStoreWritingMessageHandler 上配置 zsetIncrementExpression。此外,自 ZADD Redis 命令上的 INCR 选项是可选的以来,此属性已从 true 更改为 false

The RedisStoreWritingMessageHandler is supplied now with additional String-based setters for SpEL expressions (for convenience with Java configuration). You can now configure the zsetIncrementExpression on the RedisStoreWritingMessageHandler as well. In addition, this property has been changed from true to false since the INCR option on ZADD Redis command is optional.

现在,您可以为 RedisInboundChannelAdapter 提供一个用于执行 Redis 侦听器调用者的 Executor。此外,收到的消息现在包含一个 RedisHeaders.MESSAGE_SOURCE 标头,以指示消息的来源(主题或模式)。

You can now supply the RedisInboundChannelAdapter with an Executor for executing Redis listener invokers. In addition, the received messages now contain a RedisHeaders.MESSAGE_SOURCE header to indicate the source of the message (topic or pattern).

有关更多信息,请参见Redis Support

See Redis Support for more information.

TCP Changes

我们添加了一个新的 ThreadAffinityClientConnectionFactory 来将 TCP 连接绑定到线程。

We added a new ThreadAffinityClientConnectionFactory to bind TCP connections to threads.

现在,您可以配置 TCP 连接工厂以支持 PushbackInputStream 实例,让反序列化程序在“向前读取”后“不读”(推回)字节。

You can now configure the TCP connection factories to support PushbackInputStream instances, letting deserializers “unread” (push back) bytes after “reading ahead”.

我们添加了一个没有 maxMessageSizeByteArrayElasticRawDeserializer 来根据需要控制和缓冲传入数据。

We added a ByteArrayElasticRawDeserializer without maxMessageSize to control and buffer incoming data as needed.

有关更多信息,请参见TCP and UDP Support

See TCP and UDP Support for more information.

JDBC Changes

JdbcMessageChannelStore 现在为 ChannelMessageStorePreparedStatementSetter 提供了一个设置程序,让您可以自定义消息插入存储。

The JdbcMessageChannelStore now provides a setter for ChannelMessageStorePreparedStatementSetter, letting you customize message insertion in the store.

ExpressionEvaluatingSqlParameterSourceFactory 现在为 sqlParameterTypes 提供了一个设置程序,让您可以自定义参数的 SQL 类型。

The ExpressionEvaluatingSqlParameterSourceFactory now provides a setter for sqlParameterTypes, letting you customize the SQL types of the parameters.

有关更多信息,请参见 JDBC Support

See JDBC Support for more information.

Metrics Changes

现在支持 Micrometer 应用程序监控(自版本 5.0.2 以来)。有关详细信息,请参阅 Micrometer Integration

Micrometer application monitoring is now supported (since version 5.0.2). See Micrometer Integration for more information.

5.0.3 版本中的 Micro 仪表 Meters 进行了更改,使其更适合在维度系统中使用。5.0.4 中进行了进一步的更改。如果您使用 Micro 仪表,我们建议最低版本为 5.0.4。

Changes were made to the Micrometer Meters in version 5.0.3 to make them more suitable for use in dimensional systems. Further changes were made in 5.0.4. If you use Micrometer, we recommend a minimum of version 5.0.4.

@EndpointId Annotations

此注释在版本 5.0.4 中引入,当您使用 Java 配置时,它将提供对 bean 命名进行控制。有关详细信息,请参阅 Endpoint Bean Names

Introduced in version 5.0.4, this annotation provides control over bean naming when you use Java configuration. See Endpoint Bean Names for more information.