@Singleton @Requires(property="micronaut.server.locale-resolution.session-attribute") public class SessionLocaleResolver extends HttpAbstractLocaleResolver
httpLocaleResolutionConfiguration, ORDER
defaultLocale
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
SessionLocaleResolver(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 SessionLocaleResolver(HttpLocaleResolutionConfiguration httpLocaleResolutionConfiguration)
httpLocaleResolutionConfiguration
- The locale resolution configuration@NonNull public Optional<Locale> resolve(@NonNull HttpRequest<?> request)
LocaleResolver
request
- The context to retrieve the locale from