This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * http://maven.apache.org/xsd/maven-4.0.0.xsd with 67 occurrences migrated to: https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200). * http://www.apache.org/licenses/LICENSE-2.0.txt with 68 occurrences migrated to: https://www.apache.org/licenses/LICENSE-2.0.txt ([https](https://www.apache.org/licenses/LICENSE-2.0.txt) result 200). * http://projects.spring.io/spring-integration with 68 occurrences migrated to: https://projects.spring.io/spring-integration ([https](https://projects.spring.io/spring-integration) result 301). * http://repo.spring.io/libs-milestone with 1 occurrences migrated to: https://repo.spring.io/libs-milestone ([https](https://repo.spring.io/libs-milestone) result 302). * http://repo.spring.io/libs-snapshot with 2 occurrences migrated to: https://repo.spring.io/libs-snapshot ([https](https://repo.spring.io/libs-snapshot) result 302). * http://repo.spring.io/libs-staging-local with 1 occurrences migrated to: https://repo.spring.io/libs-staging-local ([https](https://repo.spring.io/libs-staging-local) result 302). # Ignored These URLs were intentionally ignored. * http://maven.apache.org/POM/4.0.0 with 134 occurrences * http://www.w3.org/2001/XMLSchema-instance with 67 occurrences
Dynamic FTP Sample
This example demonstrates one technique for sending files to dynamic destinations.
See DynamicFtpChannelResolver. The resolve() method maps a customer to a channel, where the channel is defined in a separate application context for each customer. The application context property placeholders are configured using the Spring 3.1 Environment management by supplying a custom property source.
A real implementation would provide these properties based on the customer; this sample simply uses the customer as part of the host name. The application context is loaded from the file in src/main/resources/....
DynamicFtpChannelResolverTests is a simple JUnit test case that verifies the same channel is used for the same customer each time, and that a different channel is used for a different customer.
FtpOutboundChannelAdapterSample shows how messages sent with a different customer header are routed to a different ftp adapter. It simply verifies that the correct UnknownHostException is returned.
Notice in the config file, how an expression-based router is used to invoke the DynamicFtpChannelResolver to obtain a reference to the appropriate channel for the customer. Notice that the channel resolver is a simple POJO, invoked using SpEL...
<int:router input-channel="toDynRouter"
expression="@channelResolver.resolve(headers['customer'])"/>
This sample shows the technique for outbound adapters. Refer to this forum thread and its links for a similar technique for dynamic inbound endpoints.