第一次编写csdn的博客,只怪stackoverflow死活登不上,没办法了
最近工作需要需要使用springintegration,以前没有使用过,不得已从头开始学习,资料也甚是不全,只能自己到处找英文原版看,也是辛苦,弄了好几天,总算跑通了helloworld和tcp的通讯了。
闲言少叙,直接上干货。
环境搭建
Maven 获取项目所需源代码
<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.bocom.bbip</groupId>
<artifactId>bbip-integration-test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<spring.version>3.2.1.RELEASE</spring.version>
<spring.integration.version>4.1.8.RELEASE</spring.integration.version>
<java.version>1.6</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Spring Integration -->
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-core</artifactId>
<version>${spring.integration.version}</version>
</dependency>
<!-- Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-ip</artifactId>
<version>${spring.integration.version}</version>
</dependency>
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.bocom.bbip</groupId>
<artifactId>bbip-integration-test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<spring.version>3.2.1.RELEASE</spring.version>
<spring.integration.version>4.1.8.RELEASE</spring.integration.version>
<java.version>1.6</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Spring Integration -->
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-core</artifactId>
<version>${spring.integration.version}</version>
</dependency>
<!-- Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-ip</artifactId>
<version>${spring.integration.version}</version>
</dependency>