Interface PropertyResolver

All Known Subinterfaces:
ConfigurableEnvironment, ConfigurablePropertyResolver, ConfigurableWebEnvironment, Environment
All Known Implementing Classes:
AbstractEnvironment, AbstractPropertyResolver, MockEnvironment, PropertySourcesPropertyResolver, StandardEnvironment, StandardServletEnvironment

public interface PropertyResolver
Interface for resolving properties against any underlying source.
Since:
3.1
Author:
Chris Beams, Juergen Hoeller
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determine whether the given property key is available for resolution — for example, if the value for the given key is not null.
    Resolve the property value associated with the given key, or null if the key cannot be resolved.
    <T> T
    getProperty(String key, Class<T> targetType)
    Resolve 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)
    Resolve the property value associated with the given key, or defaultValue if the key cannot be resolved.
    getProperty(String key, String defaultValue)
    Resolve the property value associated with the given key, or defaultValue if the key cannot be resolved.
    Resolve the property value associated with the given key (never null).
    <T> T
    getRequiredProperty(String key, Class<T> targetType)
    Resolve the property value associated with the given key, converted to the given targetType (never null).
    Resolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved by getProperty(java.lang.String).
    Resolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved by getProperty(java.lang.String).
  • Method Details