diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java index d84e9eb19e..ef81b9e649 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java @@ -230,22 +230,6 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport this.corsConfigurationSource = corsConfigurationSource; } - /** - * Get the "global" CORS configurations. - * @deprecated as of 5.1 since it is now possible to set a {@link CorsConfigurationSource} which is not a - * {@link UrlBasedCorsConfigurationSource}. Expected to be removed in 5.2. - */ - @Deprecated - public Map getCorsConfigurations() { - if (this.corsConfigurationSource instanceof UrlBasedCorsConfigurationSource) { - return ((UrlBasedCorsConfigurationSource)this.corsConfigurationSource).getCorsConfigurations(); - } - else { - throw new IllegalStateException("No CORS configurations available when the source " + - "is not an UrlBasedCorsConfigurationSource"); - } - } - /** * Configure a custom {@link CorsProcessor} to use to apply the matched * {@link CorsConfiguration} for a request.