Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
WebMvcConfigurerComposite: Overridden method 'WebMvcConfigurer.addCorsMappings' never called [SPR-17580] #22112
Through some debugging, found that addWebMvcConfigurers is called after addCorsMappings. Because of this the overridden addCorsMappings is never called. For now my workaround is using the CorsFilter but I would rather setup in the Web Configuration.
Rossen Stoyanchev commented
This shouldn't be the case normally. It sounds like something is triggering early initialization of the Spring MVC infrastructure. Perhaps some class injecting and calling methods on WebMvcConfigurationSupport. Can you reproduce this in an isolated sample?