Class EmbeddedValueResolver
- java.lang.Object
- org.springframework.beans.factory.config.EmbeddedValueResolver
- All Implemented Interfaces:
StringValueResolver
public class EmbeddedValueResolver extends Object implements StringValueResolver
StringValueResolver
adapter for resolving placeholders and expressions against aConfigurableBeanFactory
.Note that this adapter resolves expressions as well, in contrast to the
ConfigurableBeanFactory.resolveEmbeddedValue(java.lang.String)
method. TheBeanExpressionContext
used is for the plain bean factory, with no scope specified for any contextual objects to access.- Since:
- 4.3
- Author:
- Juergen Hoeller
- See Also:
ConfigurableBeanFactory.resolveEmbeddedValue(String)
,ConfigurableBeanFactory.getBeanExpressionResolver()
,BeanExpressionContext
Constructor Summary
Constructors Constructor Description EmbeddedValueResolver(ConfigurableBeanFactory beanFactory)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
resolveStringValue(String strVal)
Resolve the given String value, for example parsing placeholders.
Constructor Detail
EmbeddedValueResolver
public EmbeddedValueResolver(ConfigurableBeanFactory beanFactory)
Method Detail
resolveStringValue
@Nullable public String resolveStringValue(String strVal)
Description copied from interface:StringValueResolver
Resolve the given String value, for example parsing placeholders.- Specified by:
resolveStringValue
in interfaceStringValueResolver
- Parameters:
strVal
- the original String value (nevernull
)- Returns:
- the resolved String value (may be
null
when resolved to a null value), possibly the original String value itself (in case of no placeholders to resolve or when ignoring unresolvable placeholders)