Class MessageInterpolatorFactory
java.lang.Object
org.springframework.boot.validation.MessageInterpolatorFactory
- All Implemented Interfaces:
org.springframework.beans.factory.ObjectFactory<jakarta.validation.MessageInterpolator>
public class MessageInterpolatorFactory
extends Object
implements org.springframework.beans.factory.ObjectFactory<jakarta.validation.MessageInterpolator>
ObjectFactory
that can be used to create a MessageInterpolator
.
Attempts to pick the most appropriate MessageInterpolator
based on the
classpath.- Since:
- 1.5.0
-
Constructor Summary
ConstructorDescriptionMessageInterpolatorFactory
(org.springframework.context.MessageSource messageSource) Creates a newMessageInterpolatorFactory
that will produce aMessageInterpolator
that uses the givenmessageSource
to resolve any message parameters before final interpolation. -
Method Summary
-
Constructor Details
-
MessageInterpolatorFactory
public MessageInterpolatorFactory() -
MessageInterpolatorFactory
public MessageInterpolatorFactory(org.springframework.context.MessageSource messageSource) Creates a newMessageInterpolatorFactory
that will produce aMessageInterpolator
that uses the givenmessageSource
to resolve any message parameters before final interpolation.- Parameters:
messageSource
- message source to be used by the interpolator- Since:
- 2.6.0
-
-
Method Details
-
getObject
public jakarta.validation.MessageInterpolator getObject() throws org.springframework.beans.BeansException- Specified by:
getObject
in interfaceorg.springframework.beans.factory.ObjectFactory<jakarta.validation.MessageInterpolator>
- Throws:
org.springframework.beans.BeansException
-