/** * Callback for building the global CORS configuration. This method is final. * Use {@link #addCorsMappings(CorsRegistry)} to customize the CORS conifg. */ protected final Map<String, CorsConfiguration> getCorsConfigurations() { if (this.corsConfigurations == null) { CorsRegistry registry = new CorsRegistry(); addCorsMappings(registry); this.corsConfigurations = registry.getCorsConfigurations(); } return this.corsConfigurations; }