diff --git a/spring-integration-http/src/main/java/org/springframework/integration/http/inbound/HttpRequestHandlingEndpointSupport.java b/spring-integration-http/src/main/java/org/springframework/integration/http/inbound/HttpRequestHandlingEndpointSupport.java index e0353e5306..d14a469cf0 100644 --- a/spring-integration-http/src/main/java/org/springframework/integration/http/inbound/HttpRequestHandlingEndpointSupport.java +++ b/spring-integration-http/src/main/java/org/springframework/integration/http/inbound/HttpRequestHandlingEndpointSupport.java @@ -296,6 +296,8 @@ abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewaySuppor } } } + + this.validateSupportedMethods(); } /** @@ -512,4 +514,17 @@ abstract class HttpRequestHandlingEndpointSupport extends MessagingGatewaySuppor } return evaluationContext; } + + private void validateSupportedMethods() { + if (this.requestPayloadType != null){ + for (HttpMethod httpMethod : this.supportedMethods) { + if (HttpMethod.GET.equals(httpMethod) || HttpMethod.HEAD.equals(httpMethod) || HttpMethod.OPTIONS.equals(httpMethod)){ + if (logger.isWarnEnabled()){ + logger.warn("The 'requestPayloadType' attribute will have no relevance for one of the specified HTTP methods '" + + httpMethod + "'"); + } + } + } + } + } }