@Singleton public class LocaleArgumentBinder extends java.lang.Object implements TypedRequestArgumentBinder<java.util.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<java.util.Locale> |
argumentType() |
ArgumentBinder.BindingResult<java.util.Locale> |
bind(ArgumentConversionContext<java.util.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<java.util.Locale> argumentType()
argumentType
in interface TypeArgumentBinder<java.util.Locale,HttpRequest<?>>
public ArgumentBinder.BindingResult<java.util.Locale> bind(ArgumentConversionContext<java.util.Locale> context, HttpRequest<?> source)
ArgumentBinder
bind
in interface ArgumentBinder<java.util.Locale,HttpRequest<?>>
context
- The ArgumentConversionContext
source
- The sourceOptional
of the value. If no binding was possible Optional.empty()