Q:

How to get locale in Spring WebFlux?

I want to get current locale but the context always return default locale. It works
fine in Spring Boot.
@Bean
public LocaleResolver localeResolver() {
    return new ResourceBundleMessageSource().getMessageSource().getMessage("locale", Locale.getDefault());
}

A:

You can use the following code to get the locale:
Locale locale =