Merge branch '6.2.x'
This commit is contained in:
@@ -605,9 +605,6 @@ public abstract class AbstractHandlerMethodMapping<T> extends AbstractHandlerMap
|
||||
HandlerMethod handlerMethod = createHandlerMethod(handler, method);
|
||||
validateMethodMapping(handlerMethod, mapping);
|
||||
|
||||
// Enable method validation, if applicable
|
||||
handlerMethod = handlerMethod.createWithValidateFlags();
|
||||
|
||||
Set<String> directPaths = AbstractHandlerMethodMapping.this.getDirectPaths(mapping);
|
||||
for (String path : directPaths) {
|
||||
this.pathLookup.add(path, mapping);
|
||||
@@ -626,6 +623,10 @@ public abstract class AbstractHandlerMethodMapping<T> extends AbstractHandlerMap
|
||||
this.corsLookup.put(handlerMethod, corsConfig);
|
||||
}
|
||||
|
||||
// Init validation flags
|
||||
// We do this strictly after using the original instance in the CORS lookups
|
||||
handlerMethod = handlerMethod.createWithValidateFlags();
|
||||
|
||||
this.registry.put(mapping,
|
||||
new MappingRegistration<>(mapping, handlerMethod, directPaths, name, corsConfig != null));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user