This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Adapter for reading files --> | |
<int-file:inbound-channel-adapter id="producer-file-adapter" | |
channel="inboundChannel" directory="file:d://si-inbound" | |
prevent-duplicates="true"> | |
<int:poller fixed-rate="5000" /> | |
</int-file:inbound-channel-adapter> | |
<!-- a direct inbound channel --> | |
<int:channel id="inboundChannel" /> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Adapter for reading files --> | |
<int-file:inbound-channel-adapter id="producer-file-adapter" | |
channel="inboundChannel" directory="file:d://si-inbound" | |
prevent-duplicates="true"> | |
<int:poller fixed-rate="5000" /> | |
</int-file:inbound-channel-adapter> | |
<!-- a direct inbound channel --> | |
<int:channel id="inboundChannel" /> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Scans within the base package of the application for @Components to | |
configure as beans --> | |
<context:component-scan base-package="com.cd.spring" /> | |
<!-- Adapter for reading files --> | |
<int-file:inbound-channel-adapter id="producer-file-adapter" | |
channel="inboundChannel" directory="file:d://si-inbound" | |
prevent-duplicates="true"> | |
<int:poller fixed-rate="5000" /> | |
</int-file:inbound-channel-adapter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Scans within the base package of the application for @Components to | |
configure as beans --> | |
<context:component-scan base-package="com.cd.spring" /> | |
<!-- Adapter for reading stdin stream --> | |
<!-- message producer / a Spring Integration wrapped Java Standard input | |
stream --> | |
<int-stream:stdin-channel-adapter id="producer-stream-adapter" | |
channel="inboundChannel" /> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
<xs:element name="shiporder"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element name="orderperson" type="xs:string"/> | |
<xs:element name="shipto"> | |
<xs:complexType> | |
<xs:sequence> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cd.spring; | |
import java.io.File; | |
import org.springframework.integration.core.MessageSelector; | |
import org.springframework.messaging.Message; | |
public class FileSelector implements MessageSelector{ | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Inbound Adapters --> | |
<!-- Inbound File Adaptor which listens to d://inbound location for any files --> | |
<int-file:inbound-channel-adapter id="producer-file-adapter" channel="messageChannel" directory="file:d://si-inbound" prevent-duplicates="true"> | |
<int:poller fixed-rate="5000" /> | |
</int-file:inbound-channel-adapter> | |
<!-- Inbound Standard Input Adapter which acts as a Message producer. A Spring Integration wrapped Java Standard input stream --> | |
<int-stream:stdin-channel-adapter id="producer" | |
channel="messageChannel" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cd.spring; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.context.ConfigurableApplicationContext; | |
import org.springframework.context.annotation.ImportResource; | |
import org.springframework.integration.support.MessageBuilder; | |
import org.springframework.messaging.Message; | |
import org.springframework.messaging.MessageChannel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:int="http://www.springframework.org/schema/integration" | |
xmlns:int-file= "http://www.springframework.org/schema/integration/file" | |
xmlns:int-stream="http://www.springframework.org/schema/integration/stream" | |
xmlns:int-xml="http://www.springframework.org/schema/integration/xml" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.cd.spring</groupId> | |
<artifactId>si-starter</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>jar</packaging> |
NewerOlder