## 接口的使用
org.springframework.context.MessageSourceResolvable

- 使用MessageSourceResolvable的程序包
  程序包 | 说明
  --- | ---
  org.springframework.context | This package builds on the beans package to add support for message sources and for the Observer design pattern, and the ability for application objects to obtain resources using a consistent API.
  org.springframework.context.support | Classes supporting the org.springframework.context package, such as abstract base classes for ApplicationContext implementations and a MessageSource implementation.
  org.springframework.validation | Provides data binding and validation functionality, for usage in business and/or UI layers.
  org.springframework.validation.beanvalidation | Support classes for integrating a JSR-303 Bean Validation provider (such as Hibernate Validator) into a Spring ApplicationContext and in particular with Spring's data binding and validation APIs.

- - ### org.springframework.context中MessageSourceResolvable的使用

    参数类型为MessageSourceResolvable的org.springframework.context中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `String` | MessageSource.`getMessage(MessageSourceResolvable resolvable, Locale locale)` Try to resolve the message using all the attributes contained within the `MessageSourceResolvable` argument that was passed in.

  - ### org.springframework.context.support中MessageSourceResolvable的使用

    实现MessageSourceResolvable的org.springframework.context.support中的类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `DefaultMessageSourceResolvable` Spring's default implementation of the `MessageSourceResolvable` interface.

    参数类型为MessageSourceResolvable的org.springframework.context.support中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected String` | AbstractMessageSource.`getDefaultMessage(MessageSourceResolvable resolvable, Locale locale)` Get a default message for the given `MessageSourceResolvable`.
    `String` | MessageSourceAccessor.`getMessage(MessageSourceResolvable resolvable)` Retrieve the given MessageSourceResolvable (e.g. an ObjectError instance) in the default Locale.
    `String` | AbstractApplicationContext.`getMessage(MessageSourceResolvable resolvable, Locale locale)`
    `String` | AbstractMessageSource.`getMessage(MessageSourceResolvable resolvable, Locale locale)`
    `String` | DelegatingMessageSource.`getMessage(MessageSourceResolvable resolvable, Locale locale)`
    `String` | MessageSourceAccessor.`getMessage(MessageSourceResolvable resolvable, Locale locale)` Retrieve the given MessageSourceResolvable (e.g. an ObjectError instance) in the given Locale.

    参数类型为MessageSourceResolvable的org.springframework.context.support中的构造器
    构造器和说明
    `DefaultMessageSourceResolvable(MessageSourceResolvable resolvable)` Copy constructor: Create a new instance from another resolvable.

  - ### org.springframework.validation中MessageSourceResolvable的使用

    实现MessageSourceResolvable的org.springframework.validation中的类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `FieldError` Encapsulates a field error, that is, a reason for rejecting a specific field value.
    `class` | `ObjectError` Encapsulates an object error, that is, a global reason for rejecting an object.

  - ### org.springframework.validation.beanvalidation中MessageSourceResolvable的使用

    返回MessageSourceResolvable的org.springframework.validation.beanvalidation中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected MessageSourceResolvable` | SpringValidatorAdapter.`getResolvableField(String objectName, String field)` Build a resolvable wrapper for the specified field, allowing to resolve the field's name in a `MessageSource`.