Skip to content

WebMvcConfigurer is overridden by WebMvcAutoConfiguration #12389

@dpash

Description

@dpash

I noticed that as a result of #11105, my custom WebMvcConfigurer.configureContentNegotiation(ContentNegotiationConfigurer configurer) changes were being overwritten by the defaults from WebMvcProperties. Regardless of the @Order value given, WebMvcAutoConfiguration.configureContentNegotiation(ContentNegotiationConfigurer configurer) always seems to happen after the user configurer.

This means the only way to configure the content negotiation is through the property files.

In 1.5, I was calling configurer.favorParameter(true), but this gets overwritten by the default property, false, in 2.0.

@bclozel mentioned in #11105 that this appears to be a general ordering problem with WebMvcConfigurer, hence raising this issue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions