[[migration-1.0-2.0]]
=== Changes between Versions 1.0 and 2.0

See the https://github.com/spring-projects/spring-integration/wiki/Spring-Integration-1.0-to-2.0-Migration-Guide[Migration Guide] for important changes that might affect your applications.

[[migration-spring-30-support]]
==== 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.

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

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.

[[conversion-support]]
===== 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 https://www.enterpriseintegrationpatterns.com/DatatypeChannel.html[Datatype channel].
See <<./channel.adoc#channel-implementations,Message Channel Implementations>> and <<./service-activator.adoc#service-activator,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.

[[task-scheduler-poller-support]]
===== `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.adoc#channel-adapter,Channel Adapter>> for sample configurations.

[[rest-support]]
===== `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.adoc#http-outbound,HTTP Outbound Components>> for more details.

[[new-eip]]
==== Enterprise Integration Pattern Additions

Also in 2.0, we have added support for even more of the patterns described in Hohpe and Woolf's https://www.enterpriseintegrationpatterns.com/[Enterprise Integration Patterns] book.

[[new-message-history]]
===== Message History

We now provide support for the https://www.enterpriseintegrationpatterns.com/MessageHistory.html[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.adoc#message-history,Message History>> for more details.

[[new-message-store]]
===== Message Store

We now provide support for the https://www.enterpriseintegrationpatterns.com/MessageStore.html[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.adoc#message-store,Message Store>>, <<./claim-check.adoc#claim-check,Claim Check>>, <<./channel.adoc#channel,Message Channels>>, <<./aggregator.adoc#aggregator,Aggregator>>, <<./jdbc.adoc#jdbc,JDBC Support>>`", and <<./resequencer.adoc#resequencer,Resequencer>> for more details.

[[new-claim-check]]
===== Claim Check

We have added an implementation of the https://www.enterpriseintegrationpatterns.com/StoreInLibrary.html[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.adoc#claim-check,Claim Check>> for more details.

[[new-control-bus]]
===== Control Bus

We have provided implementations of the https://www.enterpriseintegrationpatterns.com/ControlBus.html[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.adoc#control-bus,Control Bus>> and <<./groovy.adoc#groovy-control-bus,Control Bus>> for more details.

[[new-adapters]]
==== New Channel Adapters and Gateways

We have added several new channel adapters and messaging gateways in Spring Integration 2.0.

[[new-ip]]
===== TCP and UDP Adapters

We have added channel adapters for receiving and sending messages over the TCP and UDP internet protocols.
See <<./ip.adoc#ip,TCP and UDP Support>> for more details.
See also the following blog: https://spring.io/blog/2010/03/29/using-udp-and-tcp-adapters-in-spring-integration-2-0-m3/["`Using UDP and TCP Adapters in Spring Integration 2.0 M3`"].

[[new-twitter]]
===== 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 https://github.com/spring-projects/spring-integration-extensions/tree/master/spring-integration-social-twitter[Spring Integration Social Twitter] for more details.

[[new-xmpp]]
===== XMPP Adapters

The new XMPP adapters support both chat messages and presence events.
See <<./xmpp.adoc#xmpp,XMPP Support>> for more details.

[[new-ftp]]
===== FTP and FTPS Adapters

Inbound and outbound file transfer support over FTP and FTPS is now available.
See <<./ftp.adoc#ftp,FTP/FTPS Adapters>> for more details.

[[new-sftp]]
===== SFTP Adapters

Inbound and outbound file transfer support over SFTP is now available.
See <<./sftp.adoc#sftp,SFTP Adapters>> for more details.

[[new-feed]]
===== Feed Adapters

We have also added channel adapters for receiving news feeds (ATOM and RSS).
See <<./feed.adoc#feed,Feed Adapter>> for more details.

[[new-other]]
==== Other Additions
Spring Integration adds a number of other features.
This section describes them.

[[new-groovy]]
===== Groovy Support

Spring Integration 2.0 added Groovy support, letting you use the Groovy scripting language to provide integration and business logic.
See <<./groovy.adoc#groovy,Groovy support>> for more details.

[[new-map-transformer]]
===== Map Transformers

These symmetrical transformers convert payload objects to and from `Map` objects.
See <<./transformer.adoc#transformer,Transformer>> for more details.

[[new-json-transformer]]
===== JSON Transformers

These symmetrical transformers convert payload objects to and from JSON.
See <<./transformer.adoc#transformer,Transformer>> for more details.

[[new-serialize-transformer]]
===== 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.adoc#transformer,Transformer>> for more details.

[[new-refactoring]]
==== 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 <<./router.adoc#dynamic-routers,Dynamic Routers>>, <<./gateway.adoc#gateway,Messaging Gateways>>, <<./http.adoc#http-outbound,HTTP Outbound Components>>, <<./message.adoc#message,Message>>, and <<./aggregator.adoc#aggregator,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`").

[[new-infrastructure]]
==== 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 https://git.springsource.org/spring-integration.
We have also switched our build system to https://gradle.org/[Gradle].

[[new-samples]]
==== 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: https://spring.io/blog/2010/09/29/new-spring-integration-samples/[New Spring Integration Samples].
We have also created many new samples, including samples for every new adapter.

[[new-sts]]
==== 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 https://spring.io/tools/sts[Spring Tool Suite].
