@Singleton @Requires(property="micronaut.server.locale-resolution.cookie-name") public class CookieLocaleResolver extends HttpAbstractLocaleResolver
httpLocaleResolutionConfiguration, ORDER
defaultLocale
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
CookieLocaleResolver(HttpLocaleResolutionConfiguration httpLocaleResolutionConfiguration) |
Modifier and Type | Method and Description |
---|---|
Optional<Locale> |
resolve(HttpRequest<?> request)
Resolves the locale for the given context.
|
getOrder
resolveOrDefault
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
resolveOrDefault
public CookieLocaleResolver(HttpLocaleResolutionConfiguration httpLocaleResolutionConfiguration)
httpLocaleResolutionConfiguration
- Locale resolution configuration@NonNull public Optional<Locale> resolve(@NonNull HttpRequest<?> request)
LocaleResolver
request
- The context to retrieve the locale from