@Test public void testCorsConfigurer() { WebMvcConfigurer configurer = registration.corsConfigurer(); assertNotNull(configurer); CorsRegistry corsRegistry = new CorsRegistry(); configurer.addCorsMappings(corsRegistry); List<CorsRegistration> registrations = (List<CorsRegistration>) Whitebox.getInternalState(corsRegistry, "registrations"); assertNotNull(registrations); assertFalse(registrations.isEmpty()); CorsRegistration registration = registrations.get(0); String pathPattern = (String) Whitebox.getInternalState(registration, "pathPattern"); assertEquals(URL_PATTERN_CORS, pathPattern); }
@Bean public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurerAdapter() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping(CORS_MAPPING).allowedMethods(PATH_WILDCARD); } }; }
WebResourcesRegistration { @Bean public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurerAdapter() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping(CORS_MAPPING).allowedMethods(PATH_WILDCARD); } }; } }
WebResourcesRegistration { @Bean public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurerAdapter() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping(CORS_MAPPING).allowedMethods(PATH_WILDCARD); } }; }  }
WebResourcesRegistration { @Bean public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurerAdapter() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping(CORS_MAPPING).allowedMethods(PATH_WILDCARD); } }; }  @Bean FilterRegistrationBean webhookCheckOriginFilterRegistration(); @Bean FilterRegistrationBean webhookTracingFilterRegistration(); @Bean FilterRegistrationBean integrationMetricsFilterRegistration(); @Bean ServletRegistrationBean apiServletRegistration(WebApplicationContext context,
      MultipartProperties multipartProperties); @Bean WebMvcConfigurer corsConfigurer(); }
WebResourcesRegistration { @Bean public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurerAdapter() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping(CORS_MAPPING).allowedMethods(PATH_WILDCARD); } }; }  @Bean FilterRegistrationBean webhookCheckOriginFilterRegistration(); @Bean FilterRegistrationBean webhookTracingFilterRegistration(); @Bean FilterRegistrationBean integrationMetricsFilterRegistration(); @Bean ServletRegistrationBean apiServletRegistration(WebApplicationContext context,
      MultipartProperties multipartProperties); @Bean WebMvcConfigurer corsConfigurer();  }