diff --git a/build.gradle b/build.gradle index 3795c9ed32..ddbb749220 100644 --- a/build.gradle +++ b/build.gradle @@ -61,7 +61,7 @@ subprojects { subproject -> apply plugin: 'spring-io' dependencies { - springIoVersions "io.spring.platform:platform-versions:${platformVersion}@properties" + springIoVersions "io.spring.platform:platform-bom:${platformVersion}@properties" } } @@ -104,7 +104,7 @@ subprojects { subproject -> jpaApiVersion = '2.0.0' jrubyVersion = '1.7.19' jschVersion = '0.1.52' - jsonpathVersion = '1.2.0' + jsonpathVersion = '2.0.0' junitVersion = '4.11' jythonVersion = '2.5.3' log4jVersion = '1.2.17' diff --git a/spring-integration-http/src/main/java/org/springframework/integration/http/inbound/IntegrationRequestMappingHandlerMapping.java b/spring-integration-http/src/main/java/org/springframework/integration/http/inbound/IntegrationRequestMappingHandlerMapping.java index 69d8186214..7bf07bb1a9 100644 --- a/spring-integration-http/src/main/java/org/springframework/integration/http/inbound/IntegrationRequestMappingHandlerMapping.java +++ b/spring-integration-http/src/main/java/org/springframework/integration/http/inbound/IntegrationRequestMappingHandlerMapping.java @@ -90,11 +90,24 @@ public final class IntegrationRequestMappingHandlerMapping extends RequestMappin protected final HandlerExecutionChain getHandlerExecutionChain(Object handler, HttpServletRequest request) { if (handler instanceof HandlerMethod) { HandlerMethod handlerMethod = (HandlerMethod) handler; - handler = handlerMethod.getBean(); + Object bean = handlerMethod.getBean(); + if (bean instanceof HttpRequestHandlingEndpointSupport) { + handler = bean; + } } return super.getHandlerExecutionChain(handler, request); } + @Override + protected CorsConfiguration getCorsConfiguration(Object handler, HttpServletRequest request) { + if (handler instanceof HandlerMethod) { + return super.getCorsConfiguration(handler, request); + } + else { + return super.getCorsConfiguration(new HandlerMethod(handler, HANDLE_REQUEST_METHOD), request); + } + } + @Override protected final void detectHandlerMethods(Object handler) { if (handler instanceof String) {