This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Integration 6.3.4!spring-doc.cn

This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Integration 6.3.4!spring-doc.cn

See the Migration Guide for important changes that might affect your applications.spring-doc.cn

Spring 3 support

Spring Integration 2.0 is built on top of Spring 3.0.5 and makes many of its features available to our users.spring-doc.cn

[[2.0-spel-support]] === Support for the Spring Expression Language (SpEL)spring-doc.cn

You can now use SpEL expressions within the transformer, router, filter, splitter, aggregator, service-activator, header-enricher, and many more elements of the Spring Integration core namespace as well as within various adapters. This guide includes many samples.spring-doc.cn

Conversion Service and Converter

You can now benefit from the conversion service support provided with Spring while configuring many Spring Integration components, such as a Datatype channel. See Message Channel Implementations and Service Activator. Also, the SpEL support mentioned in the previous point also relies upon the conversion service. Therefore, you can register converters once and take advantage of them anywhere you use SpEL expressions.spring-doc.cn

TaskScheduler and Trigger

Spring 3.0 defines two new strategies related to scheduling: TaskScheduler and Trigger. Spring Integration (which uses a lot of scheduling) now builds upon these. In fact, Spring Integration 1.0 had originally defined some of the components (such as CronTrigger) that have now been migrated into Spring 3.0’s core API. Now you can benefit from reusing the same components within the entire application context (not just Spring Integration configuration). We also greatly simplified configuration of Spring Integration pollers by providing attributes for directly configuring rates, delays, cron expressions, and trigger references. See Channel Adapter for sample configurations.spring-doc.cn

RestTemplate and HttpMessageConverter

Our outbound HTTP adapters now delegate to Spring’s RestTemplate for executing the HTTP request and handling its response. This also means that you can reuse any custom HttpMessageConverter implementations. See HTTP Outbound Components for more details.spring-doc.cn

Enterprise Integration Pattern Additions

Also in 2.0, we have added support for even more of the patterns described in Hohpe and Woolf’s Enterprise Integration Patterns book.spring-doc.cn

Message History

We now provide support for the message history pattern, letting you keep track of all traversed components, including the name of each channel and endpoint as well as the timestamp of that traversal. See Message History for more details.spring-doc.cn

Message Store

We now provide support for the message store pattern. The message store provides a strategy for persisting messages on behalf of any process whose scope extends beyond a single transaction, such as the aggregator and the resequencer. Many sections of this guide include samples of how to use a message store, as it affects several areas of Spring Integration. See Message Store, Claim Check, Message Channels, Aggregator, JDBC Support`", and Resequencer for more details.spring-doc.cn

Claim Check

We have added an implementation of the claim check pattern. The idea behind the claim check pattern is that you can exchange a message payload for a “claim ticket”. This lets you reduce bandwidth and avoid potential security issues when sending messages across channels. See Claim Check for more details.spring-doc.cn

Control Bus

We have provided implementations of the control bus pattern, which lets you use messaging to manage and monitor endpoints and channels. The implementations include both a SpEL-based approach and one that runs Groovy scripts. See Control Bus and Control Bus for more details.spring-doc.cn

New Channel Adapters and Gateways

We have added several new channel adapters and messaging gateways in Spring Integration 2.0.spring-doc.cn

TCP and UDP Adapters

We have added channel adapters for receiving and sending messages over the TCP and UDP internet protocols. See TCP and UDP Support for more details. See also the following blog: “Using UDP and TCP Adapters in Spring Integration 2.0 M3”.spring-doc.cn

Twitter Adapters

Twitter adapters provides support for sending and receiving Twitter status updates as well as direct messages. You can also perform Twitter Searches with an inbound channel adapter. See Spring Integration Social Twitter for more details.spring-doc.cn

XMPP Adapters

The new XMPP adapters support both chat messages and presence events. See XMPP Support for more details.spring-doc.cn

FTP and FTPS Adapters

Inbound and outbound file transfer support over FTP and FTPS is now available. See FTP/FTPS Adapters for more details.spring-doc.cn

SFTP Adapters

Inbound and outbound file transfer support over SFTP is now available. See SFTP Adapters for more details.spring-doc.cn

Feed Adapters

We have also added channel adapters for receiving news feeds (ATOM and RSS). See Feed Adapter for more details.spring-doc.cn

Other Additions

Spring Integration adds a number of other features. This section describes them.spring-doc.cn

Groovy Support

Spring Integration 2.0 added Groovy support, letting you use the Groovy scripting language to provide integration and business logic. See Groovy support for more details.spring-doc.cn

Map Transformers

These symmetrical transformers convert payload objects to and from Map objects. See Transformer for more details.spring-doc.cn

JSON Transformers

These symmetrical transformers convert payload objects to and from JSON. See Transformer for more details.spring-doc.cn

Serialization Transformers

These symmetrical transformers convert payload objects to and from byte arrays. They also support the serializer and deserializer strategy interfaces that Spring 3.0.5 added. See Transformer for more details.spring-doc.cn

Framework Refactoring

The core API went through some significant refactoring to make it simpler and more usable. Although we anticipate that the impact to developers should be minimal, you should read through this document to find what was changed. Specifically, you should read Dynamic Routers, Messaging Gateways, HTTP Outbound Components, Message, and Aggregator. If you directly depend on some of the core components (Message, MessageHeaders, MessageChannel, MessageBuilder, and others), you need to update any import statements. We restructured some packaging to provide the flexibility we needed for extending the domain model while avoiding any cyclical dependencies (it is a policy of the framework to avoid such “tangles”).spring-doc.cn

New Source Control Management and Build Infrastructure

With Spring Integration 2.0, we switched our build environment to use Git for source control. To access our repository, visit git.springsource.org/spring-integration. We have also switched our build system to Gradle.spring-doc.cn

New Spring Integration Samples

With Spring Integration 2.0, we have decoupled the samples from our main release distribution. Please read the following blog to get more information: New Spring Integration Samples. We have also created many new samples, including samples for every new adapter.spring-doc.cn

Spring Tool Suite Visual Editor for Spring Integration

There is an amazing new visual editor for Spring Integration included within the latest version of SpringSource Tool Suite. If you are not already using STS, you can download it at Spring Tool Suite.spring-doc.cn