@Singleton @Primary public class CompositeHttpLocaleResolver extends HttpAbstractLocaleResolver
httpLocaleResolutionConfiguration, ORDER
defaultLocale
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
CompositeHttpLocaleResolver(HttpLocaleResolver[] localeResolvers,
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 CompositeHttpLocaleResolver(HttpLocaleResolver[] localeResolvers, HttpLocaleResolutionConfiguration httpLocaleResolutionConfiguration)
localeResolvers
- HTTP Locale ResolvershttpLocaleResolutionConfiguration
- Locale Resolution configuration for HTTP Requests@NonNull public Optional<Locale> resolve(@NonNull HttpRequest<?> request)
LocaleResolver
request
- The context to retrieve the locale from