public abstract class

AbstractPropertyResolver

extends Object
implements ConfigurablePropertyResolver
java.lang.Object
   ↳ org.springframework.core.env.AbstractPropertyResolver
Known Direct Subclasses

Class Overview

Abstract base class for resolving properties against any underlying source.

Summary

Fields
protected ConversionService conversionService
protected final Log logger
Public Constructors
AbstractPropertyResolver()
Public Methods
ConversionService getConversionService()
String getRequiredProperty(String key)
Return the property value associated with the given key, converted to the given targetType (never null).
<T> T getRequiredProperty(String key, Class<T> valueType)
Return the property value associated with the given key, converted to the given targetType (never null).
String resolvePlaceholders(String text)
Resolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved by getProperty(String).
String resolveRequiredPlaceholders(String text)
Resolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved by getProperty(String).
void setConversionService(ConversionService conversionService)
Set the ConversionService to be used when performing type conversions on properties.
void setPlaceholderPrefix(String placeholderPrefix)
void setPlaceholderSuffix(String placeholderSuffix)
void setValueSeparator(String valueSeparator)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.core.env.ConfigurablePropertyResolver
From interface org.springframework.core.env.PropertyResolver

Fields

protected ConversionService conversionService

Also: SpringCore

protected final Log logger

Also: SpringCore

Public Constructors

public AbstractPropertyResolver ()

Also: SpringCore

Public Methods

public ConversionService getConversionService ()

Also: SpringCore

public String getRequiredProperty (String key)

Also: SpringCore

Return the property value associated with the given key, converted to the given targetType (never null).

public T getRequiredProperty (String key, Class<T> valueType)

Also: SpringCore

Return the property value associated with the given key, converted to the given targetType (never null).

public String resolvePlaceholders (String text)

Also: SpringCore

Resolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved by getProperty(String). Unresolvable placeholders with no default value are ignored and passed through unchanged.

Parameters
text the String to resolve
Returns
  • the resolved String (never null)

public String resolveRequiredPlaceholders (String text)

Also: SpringCore

Resolve ${...} placeholders in the given text, replacing them with corresponding property values as resolved by getProperty(String). Unresolvable placeholders with no default value will cause an IllegalArgumentException to be thrown.

Returns
  • the resolved String (never null)

public void setConversionService (ConversionService conversionService)

Also: SpringCore

Set the ConversionService to be used when performing type conversions on properties.

public void setPlaceholderPrefix (String placeholderPrefix)

Also: SpringCore

public void setPlaceholderSuffix (String placeholderSuffix)

Also: SpringCore

public void setValueSeparator (String valueSeparator)

Also: SpringCore