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.
The text was updated successfully, but these errors were encountered:
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?
You nailed it: Found almost immediately that I had an injected RequestMappingHandlerMapping in a config class. Was using to log some info on application startup. Simple enough to move that somewhere else.