@Singleton public class LocaleArgumentBinder extends Object implements TypedRequestArgumentBinder<Locale>
Locale
arguments in controller methods using
the LocaleResolver
.ArgumentBinder.BindingResult<T>
Constructor and Description |
---|
LocaleArgumentBinder(HttpLocaleResolver localeResolver) |
Modifier and Type | Method and Description |
---|---|
Argument<Locale> |
argumentType() |
ArgumentBinder.BindingResult<Locale> |
bind(ArgumentConversionContext<Locale> context,
HttpRequest<?> source)
Bind the given argument from the given source.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
superTypes
public LocaleArgumentBinder(HttpLocaleResolver localeResolver)
localeResolver
- The locale resolverpublic Argument<Locale> argumentType()
argumentType
in interface TypeArgumentBinder<Locale,HttpRequest<?>>
public ArgumentBinder.BindingResult<Locale> bind(ArgumentConversionContext<Locale> context, HttpRequest<?> source)
ArgumentBinder
bind
in interface ArgumentBinder<Locale,HttpRequest<?>>
context
- The ArgumentConversionContext
source
- The sourceOptional
of the value. If no binding was possible Optional.empty()