Make the auto-configured LocaleContextResolver conditional on missing bean
Closes gh-23419
This commit is contained in:
@@ -69,6 +69,7 @@ import org.springframework.web.reactive.result.method.annotation.ArgumentResolve
|
||||
import org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerAdapter;
|
||||
import org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerMapping;
|
||||
import org.springframework.web.reactive.result.view.ViewResolver;
|
||||
import org.springframework.web.server.i18n.LocaleContextResolver;
|
||||
|
||||
/**
|
||||
* {@link EnableAutoConfiguration Auto-configuration} for {@link EnableWebFlux WebFlux}.
|
||||
@@ -264,6 +265,13 @@ public class WebFluxAutoConfiguration {
|
||||
return super.createRequestMappingHandlerMapping();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Override
|
||||
@ConditionalOnMissingBean
|
||||
public LocaleContextResolver localeContextResolver() {
|
||||
return super.localeContextResolver();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
|
||||
Reference in New Issue
Block a user