Class LocaleContextMessageInterpolator
java.lang.Object
org.springframework.validation.beanvalidation.LocaleContextMessageInterpolator
- All Implemented Interfaces:
MessageInterpolator
Delegates to a target
MessageInterpolator
implementation but enforces Spring's
managed Locale. Typically used to wrap the validation provider's default interpolator.- Since:
- 3.0
- Author:
- Juergen Hoeller
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.validation.MessageInterpolator
MessageInterpolator.Context
-
Constructor Summary
ConstructorDescriptionLocaleContextMessageInterpolator
(MessageInterpolator targetInterpolator) Create a new LocaleContextMessageInterpolator, wrapping the given target interpolator. -
Method Summary
Modifier and TypeMethodDescriptioninterpolate
(String message, MessageInterpolator.Context context) interpolate
(String message, MessageInterpolator.Context context, Locale locale)
-
Constructor Details
-
LocaleContextMessageInterpolator
Create a new LocaleContextMessageInterpolator, wrapping the given target interpolator.- Parameters:
targetInterpolator
- the target MessageInterpolator to wrap
-
-
Method Details
-
interpolate
- Specified by:
interpolate
in interfaceMessageInterpolator
-
interpolate
- Specified by:
interpolate
in interfaceMessageInterpolator
-