接口 MessageSourceResolvable
- 所有已知实现类:
DefaultMessageSourceResolvable,FieldError,ObjectError
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
Interface for objects that are suitable for message resolution in a
MessageSource.
Framework's own validation error classes implement this interface.
- 作者:
- Juergen Hoeller
- 另请参阅:
-
方法详细资料
-
getCodes
Return the codes to be used to resolve this message, in the order that they should get tried. The last code will therefore be the default one.- 返回:
- a String array of codes which are associated with this message
-
getArguments
Return the array of arguments to be used to resolve this message.The default implementation simply returns
null.- 返回:
- an array of objects to be used as parameters to replace placeholders within the message text
- 另请参阅:
-
getDefaultMessage
Return the default message to be used to resolve this message.The default implementation simply returns
null. Note that the default message may be identical to the primary message code (getCodes()), which effectively enforcesAbstractMessageSource.setUseCodeAsDefaultMessage(boolean)for this particular message.- 返回:
- the default message, or
nullif no default
-