@Singleton @Requires(property="micronaut.server.locale-resolution.header", notEquals="false") public class RequestLocaleResolver extends HttpAbstractLocaleResolver
HttpRequest.getLocale().| Modifier and Type | Field and Description | 
|---|---|
static java.lang.Integer | 
ORDER  | 
httpLocaleResolutionConfigurationdefaultLocaleHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description | 
|---|
RequestLocaleResolver(HttpLocaleResolutionConfiguration httpLocaleResolutionConfiguration)  | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
getOrder()  | 
java.util.Optional<java.util.Locale> | 
resolve(HttpRequest<?> request)
Resolves the locale for the given context. 
 | 
resolveOrDefaultclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresolveOrDefaultpublic RequestLocaleResolver(HttpLocaleResolutionConfiguration httpLocaleResolutionConfiguration)
httpLocaleResolutionConfiguration - Locale resolution configuration@NonNull public java.util.Optional<java.util.Locale> resolve(@NonNull HttpRequest<?> request)
LocaleResolverrequest - The context to retrieve the locale frompublic int getOrder()
getOrder in interface OrderedgetOrder in class HttpAbstractLocaleResolver