INT-3518: Upgrade versions and some cleanup
JIRA: https://jira.spring.io/browse/INT-3518
This commit is contained in:
committed by
Gary Russell
parent
30b58836e5
commit
2587ed6bd0
@@ -111,15 +111,9 @@ import org.springframework.web.servlet.HandlerMapping;
|
||||
public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewaySupport
|
||||
implements OrderlyShutdownCapable {
|
||||
|
||||
private static final boolean spring41Present = ClassUtils.isPresent("org.springframework.http.RequestEntity",
|
||||
HttpRequestHandlingEndpointSupport.class.getClassLoader());
|
||||
|
||||
private static final boolean jaxb2Present = ClassUtils.isPresent("javax.xml.bind.Binder",
|
||||
HttpRequestHandlingEndpointSupport.class.getClassLoader());
|
||||
|
||||
private static boolean romePresent = ClassUtils.isPresent("com.sun.syndication.feed.atom.Feed",
|
||||
HttpRequestHandlingEndpointSupport.class.getClassLoader());
|
||||
|
||||
private static boolean romeToolsPresent = ClassUtils.isPresent("com.rometools.rome.feed.atom.Feed",
|
||||
HttpRequestHandlingEndpointSupport.class.getClassLoader());
|
||||
|
||||
@@ -184,9 +178,7 @@ public abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewa
|
||||
logger.debug("'MappingJackson2HttpMessageConverter' was added to the 'defaultMessageConverters'.");
|
||||
}
|
||||
}
|
||||
//The 'rometools' has been introduced since Spring Framework 4.1, hence we should check the version
|
||||
// of Spring Framework using the class 'org.springframework.http.RequestEntity' from that version.
|
||||
if ((spring41Present && romeToolsPresent) || romePresent) {
|
||||
if (romeToolsPresent) {
|
||||
this.defaultMessageConverters.add(new AtomFeedHttpMessageConverter());
|
||||
this.defaultMessageConverters.add(new RssChannelHttpMessageConverter());
|
||||
if (logger.isDebugEnabled()) {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
rest-template="restTemplate"
|
||||
encode-uri="false"
|
||||
expected-response-type-expression="T (org.springframework.integration.http.outbound.HttpRequestExecutingMessageHandlerTests).testParameterizedTypeReference()">
|
||||
<uri-variable name="param" expression="T(org.apache.commons.httpclient.util.URIUtil).encodeWithinQuery('http Outbound Gateway Within Chain')"/>
|
||||
<uri-variable name="param" expression="T(java.net.URLEncoder).encode('http Outbound Gateway Within Chain', 'UTF-8')"/>
|
||||
</outbound-gateway>
|
||||
</si:chain>
|
||||
|
||||
|
||||
@@ -719,7 +719,7 @@ public class HttpRequestExecutingMessageHandlerTests {
|
||||
RestTemplate restTemplate = ctx.getBean("restTemplate", RestTemplate.class);
|
||||
channel.send(MessageBuilder.withPayload("test").build());
|
||||
Mockito.verify(restTemplate).exchange(Mockito.eq(new URI("http://localhost/test1/%2f")), Mockito.eq(HttpMethod.POST),
|
||||
Mockito.any(HttpEntity.class), Mockito.eq((Class<?>) null));
|
||||
Mockito.any(HttpEntity.class), Mockito.<Class<Object>>eq(null));
|
||||
}
|
||||
|
||||
@Test //INT-1029
|
||||
@@ -733,7 +733,7 @@ public class HttpRequestExecutingMessageHandlerTests {
|
||||
Message<?> receive = output.receive();
|
||||
assertEquals(HttpStatus.OK, ((ResponseEntity<?>) receive.getPayload()).getStatusCode());
|
||||
Mockito.verify(restTemplate)
|
||||
.exchange(Mockito.eq(new URI("http://localhost:51235/%2f/testApps?param=http%20Outbound%20Gateway%20Within%20Chain")),
|
||||
.exchange(Mockito.eq(new URI("http://localhost:51235/%2f/testApps?param=http+Outbound+Gateway+Within+Chain")),
|
||||
Mockito.eq(HttpMethod.POST), Mockito.any(HttpEntity.class), Mockito.eq(new ParameterizedTypeReference<List<String>>() {
|
||||
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user