INTSAMPLES-144: Barrier Sample

JIRA: https://jira.spring.io/browse/INTSAMPLES-144

INTSAMPLES-144: Use o-c-a for Release

INTSAMPLES-144: Switch to Spring Boot

INTSAMPLES-144: Polishing

* Upgrade to SI-4.2, SF-4.2, Boot-1.3
* Fix: https://jira.spring.io/browse/INTSAMPLES-145
This commit is contained in:
Gary Russell
2015-08-04 13:16:15 -04:00
committed by Artem Bilan
parent dd7871a7ba
commit db3d78109f
24 changed files with 541 additions and 84 deletions

View File

@@ -48,5 +48,5 @@ In STS (Eclipse), go to package **org.springframework.integration.samples.http**
The gateway (**client**) initiates a simple request posting "Hello" to the **server** and the **server** responds by appending **from the other side** to the message payload and returns. You should see the following output from the server:
INFO : org.springframework.integration.samples.http.HttpClientDemo - Replied with: Hello from the other side
++++++++++++ Replied with: Hello from the other side ++++++++++++

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2011 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,24 +17,23 @@ package org.springframework.integration.samples.http;
import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* @author Oleg Zhurakousky
* @author Gary Russell
*
*/
public class HttpClientDemo {
private static Logger logger = Logger.getLogger(HttpClientDemo.class);
/**
* @param args
*/
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("/META-INF/spring/integration/http-outbound-config.xml");
ConfigurableApplicationContext context = new ClassPathXmlApplicationContext(
"/META-INF/spring/integration/http-outbound-config.xml");
RequestGateway requestGateway = context.getBean("requestGateway", RequestGateway.class);
String reply = requestGateway.echo("Hello");
logger.info("Replied with: " + reply);
String reply = requestGateway.echo("Hello");
logger.info("\n\n++++++++++++ Replied with: " + reply + " ++++++++++++\n");
}
}

View File

@@ -16,5 +16,8 @@
<int:channel id="receiveChannel"/>
<int:service-activator input-channel="receiveChannel" expression="payload + ' from the other side'"/>
<int:chain input-channel="receiveChannel">
<int:header-filter header-names="content-type" />
<int:service-activator expression="payload + ' from the other side'"/>
</int:chain>
</beans>

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<!-- Appenders -->
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{HH:mm:ss.SSS} %-5p [%t][%c] %m%n" />
</layout>
</appender>
<!-- Loggers -->
<logger name="org.springframework">
<level value="warn" />
</logger>
<logger name="org.springframework.integration.samples">
<level value="debug" />
</logger>
<!-- Root Logger -->
<root>
<priority value="warn" />
<appender-ref ref="console" />
</root>
</log4j:configuration>