接口 MessageCodesResolver

    • 方法详细资料

      • resolveMessageCodes

        String[] resolveMessageCodes​(String errorCode,
                                     String objectName)
        Build message codes for the given error code and object name. Used for building the codes list of an ObjectError.
        参数:
        errorCode - the error code used for rejecting the object
        objectName - the name of the object
        返回:
        the message codes to use
      • resolveMessageCodes

        String[] resolveMessageCodes​(String errorCode,
                                     String objectName,
                                     String field,
                                     Class<?> fieldType)
        Build message codes for the given error code and field specification. Used for building the codes list of an FieldError.
        参数:
        errorCode - the error code used for rejecting the value
        objectName - the name of the object
        field - the field name
        fieldType - the field type (may be null if not determinable)
        返回:
        the message codes to use