Remove deprecated AbstractHandlerMapping#getCorsConfigurations
Closes gh-22719
This commit is contained in:
@@ -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<String, CorsConfiguration> 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.
|
||||
|
||||
Reference in New Issue
Block a user