org.springframework.core.env

## 类 AbstractEnvironment

- java.lang.Object
- - org.springframework.core.env.AbstractEnvironment

- 所有已实现的接口:
    ConfigurableEnvironment, ConfigurablePropertyResolver, Environment, PropertyResolver
  直接已知子类:
    StandardEnvironment

      public abstract class AbstractEnvironment
      extends Object
      implements ConfigurableEnvironment

  Abstract base class for `Environment` implementations. Supports the notion of reserved default profile names and enables specifying active and default profiles through the `ACTIVE_PROFILES_PROPERTY_NAME` and `DEFAULT_PROFILES_PROPERTY_NAME` properties.

  Concrete subclasses differ primarily on which `PropertySource` objects they add by default. `AbstractEnvironment` adds none. Subclasses should contribute property sources through the protected `customizePropertySources(MutablePropertySources)` hook, while clients should customize using `ConfigurableEnvironment.getPropertySources()` and working against the `MutablePropertySources` API. See `ConfigurableEnvironment` javadoc for usage examples.

  从以下版本开始:
    3.1
  作者:
    Chris Beams, Juergen Hoeller
  另请参阅:
    `ConfigurableEnvironment`, `StandardEnvironment`

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static String` | `ACTIVE_PROFILES_PROPERTY_NAME` Name of property to set to specify active profiles: "spring.profiles.active".
    `static String` | `DEFAULT_PROFILES_PROPERTY_NAME` Name of property to set to specify profiles active by default: "spring.profiles.default".
    `static String` | `IGNORE_GETENV_PROPERTY_NAME` System property that instructs Spring to ignore system environment variables, i.e. to never attempt to retrieve such a variable via `System.getenv()`.
    `protected Log` | `logger`
    `protected static String` | `RESERVED_DEFAULT_PROFILE_NAME` Name of reserved default profile name: "default".

  - ### 构造器概要

    构造器
    构造器和说明
    `AbstractEnvironment()` Create a new `Environment` instance, calling back to `customizePropertySources(MutablePropertySources)` during construction to allow subclasses to contribute or manipulate `PropertySource` instances as appropriate.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `boolean` | `acceptsProfiles(String... profiles)` Return whether one or more of the given profiles is active or, in the case of no explicit active profiles, whether one or more of the given profiles is included in the set of default profiles.
    `void` | `addActiveProfile(String profile)` Add a profile to the current set of active profiles.
    `boolean` | `containsProperty(String key)` Return whether the given property key is available for resolution, i.e. if the value for the given key is not `null`.
    `protected void` | `customizePropertySources(MutablePropertySources propertySources)` Customize the set of `PropertySource` objects to be searched by this `Environment` during calls to `getProperty(String)` and related methods.
    `protected Set<String>` | `doGetActiveProfiles()` Return the set of active profiles as explicitly set through `setActiveProfiles(java.lang.String...)` or if the current set of active profiles is empty, check for the presence of the "spring.profiles.active" property and assign its value to the set of active profiles.
    `protected Set<String>` | `doGetDefaultProfiles()` Return the set of default profiles explicitly set via `setDefaultProfiles(String...)` or if the current set of default profiles consists only of reserved default profiles, then check for the presence of the "spring.profiles.default" property and assign its value (if any) to the set of default profiles.
    `String[]` | `getActiveProfiles()` Return the set of profiles explicitly made active for this environment.
    `ConfigurableConversionService` | `getConversionService()` Return the `ConfigurableConversionService` used when performing type conversions on properties.
    `String[]` | `getDefaultProfiles()` Return the set of profiles to be active by default when no active profiles have been set explicitly.
    `String` | `getProperty(String key)` Return the property value associated with the given key, or `null` if the key cannot be resolved.
    `<T> T` | `getProperty(String key, Class<T> targetType)` Return the property value associated with the given key, or `null` if the key cannot be resolved.
    `<T> T` | `getProperty(String key, Class<T> targetType, T defaultValue)` Return the property value associated with the given key, or `defaultValue` if the key cannot be resolved.
    `String` | `getProperty(String key, String defaultValue)` Return the property value associated with the given key, or `defaultValue` if the key cannot be resolved.
    `MutablePropertySources` | `getPropertySources()` Return the `PropertySources` for this `Environment` in mutable form, allowing for manipulation of the set of `PropertySource` objects that should be searched when resolving properties against this `Environment` object.
    `String` | `getRequiredProperty(String key)` Return the property value associated with the given key (never `null`).
    `<T> T` | `getRequiredProperty(String key, Class<T> targetType)` Return the property value associated with the given key, converted to the given targetType (never `null`).
    `protected Set<String>` | `getReservedDefaultProfiles()` Return the set of reserved default profile names.
    `Map<String,Object>` | `getSystemEnvironment()` Return the value of `System.getenv()` if allowed by the current `SecurityManager`, otherwise return a map implementation that will attempt to access individual keys using calls to `System.getenv(String)`.
    `Map<String,Object>` | `getSystemProperties()` Return the value of `System.getProperties()` if allowed by the current `SecurityManager`, otherwise return a map implementation that will attempt to access individual keys using calls to `System.getProperty(String)`.
    `protected boolean` | `isProfileActive(String profile)` Return whether the given profile is active, or if active profiles are empty whether the profile should be active by default.
    `void` | `merge(ConfigurableEnvironment parent)` Append the given parent environment's active profiles, default profiles and property sources to this (child) environment's respective collections of each.
    `String` | `resolvePlaceholders(String text)` Resolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved by `PropertyResolver.getProperty(java.lang.String)`.
    `String` | `resolveRequiredPlaceholders(String text)` Resolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved by `PropertyResolver.getProperty(java.lang.String)`.
    `void` | `setActiveProfiles(String... profiles)` Specify the set of profiles active for this `Environment`.
    `void` | `setConversionService(ConfigurableConversionService conversionService)` Set the `ConfigurableConversionService` to be used when performing type conversions on properties.
    `void` | `setDefaultProfiles(String... profiles)` Specify the set of profiles to be made active by default if no other profiles are explicitly made active through `setActiveProfiles(java.lang.String...)`.
    `void` | `setIgnoreUnresolvableNestedPlaceholders(boolean ignoreUnresolvableNestedPlaceholders)` Set whether to throw an exception when encountering an unresolvable placeholder nested within the value of a given property.
    `void` | `setPlaceholderPrefix(String placeholderPrefix)` Set the prefix that placeholders replaced by this resolver must begin with.
    `void` | `setPlaceholderSuffix(String placeholderSuffix)` Set the suffix that placeholders replaced by this resolver must end with.
    `void` | `setRequiredProperties(String... requiredProperties)` Specify which properties must be present, to be verified by `ConfigurablePropertyResolver.validateRequiredProperties()`.
    `void` | `setValueSeparator(String valueSeparator)` Specify the separating character between the placeholders replaced by this resolver and their associated default value, or `null` if no such special character should be processed as a value separator.
    `protected boolean` | `suppressGetenvAccess()` Determine whether to suppress `System.getenv()`/`System.getenv(String)` access for the purposes of `getSystemEnvironment()`.
    `String` | `toString()`
    `protected void` | `validateProfile(String profile)` Validate the given profile, called internally prior to adding to the set of active or default profiles.
    `void` | `validateRequiredProperties()` Validate that each of the properties specified by `ConfigurablePropertyResolver.setRequiredProperties(java.lang.String...)` is present and resolves to a non-`null` value.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 字段详细资料

    - #### IGNORE_GETENV_PROPERTY_NAME

          public static final String IGNORE_GETENV_PROPERTY_NAME

      System property that instructs Spring to ignore system environment variables, i.e. to never attempt to retrieve such a variable via `System.getenv()`.

      The default is "false", falling back to system environment variable checks if a Spring environment property (e.g. a placeholder in a configuration String) isn't resolvable otherwise. Consider switching this flag to "true" if you experience log warnings from `getenv` calls coming from Spring, e.g. on WebSphere with strict SecurityManager settings and AccessControlExceptions warnings.

      另请参阅:
        `suppressGetenvAccess()`, 常量字段值

    - #### ACTIVE_PROFILES_PROPERTY_NAME

          public static final String ACTIVE_PROFILES_PROPERTY_NAME

      Name of property to set to specify active profiles: "spring.profiles.active". Value may be comma delimited.

      Note that certain shell environments such as Bash disallow the use of the period character in variable names. Assuming that Spring's `SystemEnvironmentPropertySource` is in use, this property may be specified as an environment variable as `SPRING_PROFILES_ACTIVE`.

      另请参阅:
        `ConfigurableEnvironment.setActiveProfiles(java.lang.String...)`, 常量字段值

    - #### DEFAULT_PROFILES_PROPERTY_NAME

          public static final String DEFAULT_PROFILES_PROPERTY_NAME

      Name of property to set to specify profiles active by default: "spring.profiles.default". Value may be comma delimited.

      Note that certain shell environments such as Bash disallow the use of the period character in variable names. Assuming that Spring's `SystemEnvironmentPropertySource` is in use, this property may be specified as an environment variable as `SPRING_PROFILES_DEFAULT`.

      另请参阅:
        `ConfigurableEnvironment.setDefaultProfiles(java.lang.String...)`, 常量字段值

    - #### RESERVED_DEFAULT_PROFILE_NAME

          protected static final String RESERVED_DEFAULT_PROFILE_NAME

      Name of reserved default profile name: "default". If no default profile names are explicitly and no active profile names are explicitly set, this profile will automatically be activated by default.
      另请参阅:
        `getReservedDefaultProfiles()`, `ConfigurableEnvironment.setDefaultProfiles(java.lang.String...)`, `ConfigurableEnvironment.setActiveProfiles(java.lang.String...)`, `DEFAULT_PROFILES_PROPERTY_NAME`, `ACTIVE_PROFILES_PROPERTY_NAME`, 常量字段值

    - #### logger

          protected final Log logger

  - ### 构造器详细资料

    - #### AbstractEnvironment

          public AbstractEnvironment()

      Create a new `Environment` instance, calling back to `customizePropertySources(MutablePropertySources)` during construction to allow subclasses to contribute or manipulate `PropertySource` instances as appropriate.
      另请参阅:
        `customizePropertySources(MutablePropertySources)`

  - ### 方法详细资料

    - #### customizePropertySources

          protected void customizePropertySources(MutablePropertySources propertySources)

      Customize the set of `PropertySource` objects to be searched by this `Environment` during calls to `getProperty(String)` and related methods.

      Subclasses that override this method are encouraged to add property sources using `MutablePropertySources.addLast(PropertySource)` such that further subclasses may call `super.customizePropertySources()` with predictable results. For example:

           public class Level1Environment extends AbstractEnvironment {
               @Override
               protected void customizePropertySources(MutablePropertySources propertySources) {
                   super.customizePropertySources(propertySources); // no-op from base class
                   propertySources.addLast(new PropertySourceA(...));
                   propertySources.addLast(new PropertySourceB(...));
               }
           }

           public class Level2Environment extends Level1Environment {
               @Override
               protected void customizePropertySources(MutablePropertySources propertySources) {
                   super.customizePropertySources(propertySources); // add all from superclass
                   propertySources.addLast(new PropertySourceC(...));
                   propertySources.addLast(new PropertySourceD(...));
               }
           }

      In this arrangement, properties will be resolved against sources A, B, C, D in that order. That is to say that property source "A" has precedence over property source "D". If the `Level2Environment` subclass wished to give property sources C and D higher precedence than A and B, it could simply call `super.customizePropertySources` after, rather than before adding its own:

           public class Level2Environment extends Level1Environment {
               @Override
               protected void customizePropertySources(MutablePropertySources propertySources) {
                   propertySources.addLast(new PropertySourceC(...));
                   propertySources.addLast(new PropertySourceD(...));
                   super.customizePropertySources(propertySources); // add all from superclass
               }
           }

      The search order is now C, D, A, B as desired.

      Beyond these recommendations, subclasses may use any of the `add&#42;`, `remove`, or `replace` methods exposed by `MutablePropertySources` in order to create the exact arrangement of property sources desired.

      The base implementation registers no property sources.

      Note that clients of any `ConfigurableEnvironment` may further customize property sources via the `getPropertySources()` accessor, typically within an `ApplicationContextInitializer`. For example:

           ConfigurableEnvironment env = new StandardEnvironment();
           env.getPropertySources().addLast(new PropertySourceX(...));

      ## A warning about instance variable access

      Instance variables declared in subclasses and having default initial values should not be accessed from within this method. Due to Java object creation lifecycle constraints, any initial value will not yet be assigned when this callback is invoked by the `AbstractEnvironment()` constructor, which may lead to a `NullPointerException` or other problems. If you need to access default values of instance variables, leave this method as a no-op and perform property source manipulation and instance variable access directly within the subclass constructor. Note that assigning values to instance variables is not problematic; it is only attempting to read default values that must be avoided.
      另请参阅:
        `MutablePropertySources`, `PropertySourcesPropertyResolver`, `org.springframework.context.ApplicationContextInitializer`

    - #### getReservedDefaultProfiles

          protected Set<String> getReservedDefaultProfiles()

      Return the set of reserved default profile names. This implementation returns "default". Subclasses may override in order to customize the set of reserved names.
      另请参阅:
        `RESERVED_DEFAULT_PROFILE_NAME`, `doGetDefaultProfiles()`

    - #### getActiveProfiles

          public String[] getActiveProfiles()

      从接口复制的说明: `Environment`
      Return the set of profiles explicitly made active for this environment. Profiles are used for creating logical groupings of bean definitions to be registered conditionally, for example based on deployment environment. Profiles can be activated by setting "spring.profiles.active" as a system property or by calling `ConfigurableEnvironment.setActiveProfiles(String...)`.

      If no profiles have explicitly been specified as active, then any default profiles will automatically be activated.

      指定者:
        `getActiveProfiles` 在接口中 `Environment`
      另请参阅:
        `Environment.getDefaultProfiles()`, `ConfigurableEnvironment.setActiveProfiles(java.lang.String...)`, `ACTIVE_PROFILES_PROPERTY_NAME`

    - #### doGetActiveProfiles

          protected Set<String> doGetActiveProfiles()

      Return the set of active profiles as explicitly set through `setActiveProfiles(java.lang.String...)` or if the current set of active profiles is empty, check for the presence of the "spring.profiles.active" property and assign its value to the set of active profiles.
      另请参阅:
        `getActiveProfiles()`, `ACTIVE_PROFILES_PROPERTY_NAME`

    - #### setActiveProfiles

          public void setActiveProfiles(String... profiles)

      从接口复制的说明: `ConfigurableEnvironment`
      Specify the set of profiles active for this `Environment`. Profiles are evaluated during container bootstrap to determine whether bean definitions should be registered with the container.

      Any existing active profiles will be replaced with the given arguments; call with zero arguments to clear the current set of active profiles. Use `ConfigurableEnvironment.addActiveProfile(java.lang.String)` to add a profile while preserving the existing set.

      指定者:
        `setActiveProfiles` 在接口中 `ConfigurableEnvironment`
      另请参阅:
        `ConfigurableEnvironment.addActiveProfile(java.lang.String)`, `ConfigurableEnvironment.setDefaultProfiles(java.lang.String...)`, `org.springframework.context.annotation.Profile`, `ACTIVE_PROFILES_PROPERTY_NAME`

    - #### addActiveProfile

          public void addActiveProfile(String profile)

      从接口复制的说明: `ConfigurableEnvironment`
      Add a profile to the current set of active profiles.
      指定者:
        `addActiveProfile` 在接口中 `ConfigurableEnvironment`
      另请参阅:
        `ConfigurableEnvironment.setActiveProfiles(java.lang.String...)`

    - #### getDefaultProfiles

          public String[] getDefaultProfiles()

      从接口复制的说明: `Environment`
      Return the set of profiles to be active by default when no active profiles have been set explicitly.
      指定者:
        `getDefaultProfiles` 在接口中 `Environment`
      另请参阅:
        `Environment.getActiveProfiles()`, `ConfigurableEnvironment.setDefaultProfiles(java.lang.String...)`, `DEFAULT_PROFILES_PROPERTY_NAME`

    - #### doGetDefaultProfiles

          protected Set<String> doGetDefaultProfiles()

      Return the set of default profiles explicitly set via `setDefaultProfiles(String...)` or if the current set of default profiles consists only of reserved default profiles, then check for the presence of the "spring.profiles.default" property and assign its value (if any) to the set of default profiles.
      另请参阅:
        `AbstractEnvironment()`, `getDefaultProfiles()`, `DEFAULT_PROFILES_PROPERTY_NAME`, `getReservedDefaultProfiles()`

    - #### setDefaultProfiles

          public void setDefaultProfiles(String... profiles)

      Specify the set of profiles to be made active by default if no other profiles are explicitly made active through `setActiveProfiles(java.lang.String...)`.

      Calling this method removes overrides any reserved default profiles that may have been added during construction of the environment.

      指定者:
        `setDefaultProfiles` 在接口中 `ConfigurableEnvironment`
      另请参阅:
        `AbstractEnvironment()`, `getReservedDefaultProfiles()`

    - #### acceptsProfiles

          public boolean acceptsProfiles(String... profiles)

      从接口复制的说明: `Environment`
      Return whether one or more of the given profiles is active or, in the case of no explicit active profiles, whether one or more of the given profiles is included in the set of default profiles. If a profile begins with '!' the logic is inverted, i.e. the method will return true if the given profile is not active. For example,

          env.acceptsProfiles("p1", "!p2")

      will return `true` if profile 'p1' is active or 'p2' is not active.
      指定者:
        `acceptsProfiles` 在接口中 `Environment`
      另请参阅:
        `Environment.getActiveProfiles()`, `Environment.getDefaultProfiles()`

    - #### isProfileActive

          protected boolean isProfileActive(String profile)

      Return whether the given profile is active, or if active profiles are empty whether the profile should be active by default.
      抛出:
        `IllegalArgumentException` - per `validateProfile(String)`

    - #### validateProfile

          protected void validateProfile(String profile)

      Validate the given profile, called internally prior to adding to the set of active or default profiles.

      Subclasses may override to impose further restrictions on profile syntax.

      抛出:
        `IllegalArgumentException` - if the profile is null, empty, whitespace-only or begins with the profile NOT operator (!).
      另请参阅:
        `acceptsProfiles(java.lang.String...)`, `addActiveProfile(java.lang.String)`, `setDefaultProfiles(java.lang.String...)`

    - #### getPropertySources

          public MutablePropertySources getPropertySources()

      从接口复制的说明: `ConfigurableEnvironment`
      Return the `PropertySources` for this `Environment` in mutable form, allowing for manipulation of the set of `PropertySource` objects that should be searched when resolving properties against this `Environment` object. The various `MutablePropertySources` methods such as `addFirst`, `addLast`, `addBefore` and `addAfter` allow for fine-grained control over property source ordering. This is useful, for example, in ensuring that certain user-defined property sources have search precedence over default property sources such as the set of system properties or the set of system environment variables.
      指定者:
        `getPropertySources` 在接口中 `ConfigurableEnvironment`
      另请参阅:
        `customizePropertySources(org.springframework.core.env.MutablePropertySources)`

    - #### getSystemProperties

          public Map<String,Object> getSystemProperties()

      从接口复制的说明: `ConfigurableEnvironment`
      Return the value of `System.getProperties()` if allowed by the current `SecurityManager`, otherwise return a map implementation that will attempt to access individual keys using calls to `System.getProperty(String)`.

      Note that most `Environment` implementations will include this system properties map as a default `PropertySource` to be searched. Therefore, it is recommended that this method not be used directly unless bypassing other property sources is expressly intended.

      Calls to `Map.get(Object)` on the Map returned will never throw `IllegalAccessException`; in cases where the SecurityManager forbids access to a property, `null` will be returned and an INFO-level log message will be issued noting the exception.

      指定者:
        `getSystemProperties` 在接口中 `ConfigurableEnvironment`

    - #### getSystemEnvironment

          public Map<String,Object> getSystemEnvironment()

      从接口复制的说明: `ConfigurableEnvironment`
      Return the value of `System.getenv()` if allowed by the current `SecurityManager`, otherwise return a map implementation that will attempt to access individual keys using calls to `System.getenv(String)`.

      Note that most `Environment` implementations will include this system environment map as a default `PropertySource` to be searched. Therefore, it is recommended that this method not be used directly unless bypassing other property sources is expressly intended.

      Calls to `Map.get(Object)` on the Map returned will never throw `IllegalAccessException`; in cases where the SecurityManager forbids access to a property, `null` will be returned and an INFO-level log message will be issued noting the exception.

      指定者:
        `getSystemEnvironment` 在接口中 `ConfigurableEnvironment`

    - #### suppressGetenvAccess

          protected boolean suppressGetenvAccess()

      Determine whether to suppress `System.getenv()`/`System.getenv(String)` access for the purposes of `getSystemEnvironment()`.

      If this method returns `true`, an empty dummy Map will be used instead of the regular system environment Map, never even trying to call `getenv` and therefore avoiding security manager warnings (if any).

      The default implementation checks for the "spring.getenv.ignore" system property, returning `true` if its value equals "true" in any case.

      另请参阅:
        `IGNORE_GETENV_PROPERTY_NAME`, `SpringProperties.getFlag(java.lang.String)`

    - #### merge

          public void merge(ConfigurableEnvironment parent)

      从接口复制的说明: `ConfigurableEnvironment`
      Append the given parent environment's active profiles, default profiles and property sources to this (child) environment's respective collections of each.

      For any identically-named `PropertySource` instance existing in both parent and child, the child instance is to be preserved and the parent instance discarded. This has the effect of allowing overriding of property sources by the child as well as avoiding redundant searches through common property source types, e.g. system environment and system properties.

      Active and default profile names are also filtered for duplicates, to avoid confusion and redundant storage.

      The parent environment remains unmodified in any case. Note that any changes to the parent environment occurring after the call to `merge` will not be reflected in the child. Therefore, care should be taken to configure parent property sources and profile information prior to calling `merge`.

      指定者:
        `merge` 在接口中 `ConfigurableEnvironment`
      参数:
        `parent` - the environment to merge with
      另请参阅:
        `org.springframework.context.support.AbstractApplicationContext#setParent`

    - #### getConversionService

          public ConfigurableConversionService getConversionService()

      从接口复制的说明: `ConfigurablePropertyResolver`
      Return the `ConfigurableConversionService` used when performing type conversions on properties.

      The configurable nature of the returned conversion service allows for the convenient addition and removal of individual `Converter` instances:

           ConfigurableConversionService cs = env.getConversionService();
           cs.addConverter(new FooConverter());

      指定者:
        `getConversionService` 在接口中 `ConfigurablePropertyResolver`
      另请参阅:
        `PropertyResolver.getProperty(String, Class)`, `ConverterRegistry.addConverter(org.springframework.core.convert.converter.Converter<?, ?>)`

    - #### setConversionService

          public void setConversionService(ConfigurableConversionService conversionService)

      从接口复制的说明: `ConfigurablePropertyResolver`
      Set the `ConfigurableConversionService` to be used when performing type conversions on properties.

      Note: as an alternative to fully replacing the `ConversionService`, consider adding or removing individual `Converter` instances by drilling into `ConfigurablePropertyResolver.getConversionService()` and calling methods such as `#addConverter`.

      指定者:
        `setConversionService` 在接口中 `ConfigurablePropertyResolver`
      另请参阅:
        `PropertyResolver.getProperty(String, Class)`, `ConfigurablePropertyResolver.getConversionService()`, `ConverterRegistry.addConverter(org.springframework.core.convert.converter.Converter<?, ?>)`

    - #### setPlaceholderPrefix

          public void setPlaceholderPrefix(String placeholderPrefix)

      从接口复制的说明: `ConfigurablePropertyResolver`
      Set the prefix that placeholders replaced by this resolver must begin with.
      指定者:
        `setPlaceholderPrefix` 在接口中 `ConfigurablePropertyResolver`

    - #### setPlaceholderSuffix

          public void setPlaceholderSuffix(String placeholderSuffix)

      从接口复制的说明: `ConfigurablePropertyResolver`
      Set the suffix that placeholders replaced by this resolver must end with.
      指定者:
        `setPlaceholderSuffix` 在接口中 `ConfigurablePropertyResolver`

    - #### setValueSeparator

          public void setValueSeparator(@Nullable
                                        String valueSeparator)

      从接口复制的说明: `ConfigurablePropertyResolver`
      Specify the separating character between the placeholders replaced by this resolver and their associated default value, or `null` if no such special character should be processed as a value separator.
      指定者:
        `setValueSeparator` 在接口中 `ConfigurablePropertyResolver`

    - #### setIgnoreUnresolvableNestedPlaceholders

          public void setIgnoreUnresolvableNestedPlaceholders(boolean ignoreUnresolvableNestedPlaceholders)

      从接口复制的说明: `ConfigurablePropertyResolver`
      Set whether to throw an exception when encountering an unresolvable placeholder nested within the value of a given property. A `false` value indicates strict resolution, i.e. that an exception will be thrown. A `true` value indicates that unresolvable nested placeholders should be passed through in their unresolved ${...} form.

      Implementations of `PropertyResolver.getProperty(String)` and its variants must inspect the value set here to determine correct behavior when property values contain unresolvable placeholders.

      指定者:
        `setIgnoreUnresolvableNestedPlaceholders` 在接口中 `ConfigurablePropertyResolver`

    - #### setRequiredProperties

          public void setRequiredProperties(String... requiredProperties)

      从接口复制的说明: `ConfigurablePropertyResolver`
      Specify which properties must be present, to be verified by `ConfigurablePropertyResolver.validateRequiredProperties()`.
      指定者:
        `setRequiredProperties` 在接口中 `ConfigurablePropertyResolver`

    - #### validateRequiredProperties

          public void validateRequiredProperties()
                                          throws MissingRequiredPropertiesException

      从接口复制的说明: `ConfigurablePropertyResolver`
      Validate that each of the properties specified by `ConfigurablePropertyResolver.setRequiredProperties(java.lang.String...)` is present and resolves to a non-`null` value.
      指定者:
        `validateRequiredProperties` 在接口中 `ConfigurablePropertyResolver`
      抛出:
        `MissingRequiredPropertiesException` - if any of the required properties are not resolvable.

    - #### containsProperty

          public boolean containsProperty(String key)

      从接口复制的说明: `PropertyResolver`
      Return whether the given property key is available for resolution, i.e. if the value for the given key is not `null`.
      指定者:
        `containsProperty` 在接口中 `PropertyResolver`

    - #### getProperty

          @Nullable
          public String getProperty(String key)

      从接口复制的说明: `PropertyResolver`
      Return the property value associated with the given key, or `null` if the key cannot be resolved.
      指定者:
        `getProperty` 在接口中 `PropertyResolver`
      参数:
        `key` - the property name to resolve
      另请参阅:
        `PropertyResolver.getProperty(String, String)`, `PropertyResolver.getProperty(String, Class)`, `PropertyResolver.getRequiredProperty(String)`

    - #### getProperty

          public String getProperty(String key,
                                    String defaultValue)

      从接口复制的说明: `PropertyResolver`
      Return the property value associated with the given key, or `defaultValue` if the key cannot be resolved.
      指定者:
        `getProperty` 在接口中 `PropertyResolver`
      参数:
        `key` - the property name to resolve
        `defaultValue` - the default value to return if no value is found
      另请参阅:
        `PropertyResolver.getRequiredProperty(String)`, `PropertyResolver.getProperty(String, Class)`

    - #### getProperty

          @Nullable
          public <T> T getProperty(String key,
                                              Class<T> targetType)

      从接口复制的说明: `PropertyResolver`
      Return the property value associated with the given key, or `null` if the key cannot be resolved.
      指定者:
        `getProperty` 在接口中 `PropertyResolver`
      参数:
        `key` - the property name to resolve
        `targetType` - the expected type of the property value
      另请参阅:
        `PropertyResolver.getRequiredProperty(String, Class)`

    - #### getProperty

          public <T> T getProperty(String key,
                                   Class<T> targetType,
                                   T defaultValue)

      从接口复制的说明: `PropertyResolver`
      Return the property value associated with the given key, or `defaultValue` if the key cannot be resolved.
      指定者:
        `getProperty` 在接口中 `PropertyResolver`
      参数:
        `key` - the property name to resolve
        `targetType` - the expected type of the property value
        `defaultValue` - the default value to return if no value is found
      另请参阅:
        `PropertyResolver.getRequiredProperty(String, Class)`

    - #### getRequiredProperty

          public String getRequiredProperty(String key)
                                     throws IllegalStateException

      从接口复制的说明: `PropertyResolver`
      Return the property value associated with the given key (never `null`).
      指定者:
        `getRequiredProperty` 在接口中 `PropertyResolver`
      抛出:
        `IllegalStateException` - if the key cannot be resolved
      另请参阅:
        `PropertyResolver.getRequiredProperty(String, Class)`

    - #### getRequiredProperty

          public <T> T getRequiredProperty(String key,
                                           Class<T> targetType)
                                    throws IllegalStateException

      从接口复制的说明: `PropertyResolver`
      Return the property value associated with the given key, converted to the given targetType (never `null`).
      指定者:
        `getRequiredProperty` 在接口中 `PropertyResolver`
      抛出:
        `IllegalStateException` - if the given key cannot be resolved

    - #### resolvePlaceholders

          public String resolvePlaceholders(String text)

      从接口复制的说明: `PropertyResolver`
      Resolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved by `PropertyResolver.getProperty(java.lang.String)`. Unresolvable placeholders with no default value are ignored and passed through unchanged.
      指定者:
        `resolvePlaceholders` 在接口中 `PropertyResolver`
      参数:
        `text` - the String to resolve
      返回:
        the resolved String (never `null`)
      另请参阅:
        `PropertyResolver.resolveRequiredPlaceholders(java.lang.String)`, `SystemPropertyUtils.resolvePlaceholders(String)`

    - #### resolveRequiredPlaceholders

          public String resolveRequiredPlaceholders(String text)
                                             throws IllegalArgumentException

      从接口复制的说明: `PropertyResolver`
      Resolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved by `PropertyResolver.getProperty(java.lang.String)`. Unresolvable placeholders with no default value will cause an IllegalArgumentException to be thrown.
      指定者:
        `resolveRequiredPlaceholders` 在接口中 `PropertyResolver`
      返回:
        the resolved String (never `null`)
      抛出:
        `IllegalArgumentException` - if given text is `null` or if any placeholders are unresolvable
      另请参阅:
        `SystemPropertyUtils.resolvePlaceholders(String, boolean)`

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `Object`