INT-3687: Fix CORS & upgrade to IO 2.0
JIRA: https://jira.spring.io/browse/INT-3687 * Change `master` to use IO 2.0 BOM for versions * Upgrade `jsonPath` to `2.0.0` * Fix `IntegrationRequestMappingHandlerMapping` according the latest MVC changes around CORS: https://jira.spring.io/browse/SPR-12933. * No yet any tests for `Global CORS`: waiting for Namespace support in MVC Test this with: ``` ./gradlew clean springIoCheck -PplatformVersion=2.0.0.BUILD-SNAPSHOT -PJDK8_HOME=<jdk8-home> ```
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user