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:
committed by
Artem Bilan
parent
dd7871a7ba
commit
db3d78109f
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user