Class PreferencesPlaceholderConfigurer
java.lang.Object
org.springframework.core.io.support.PropertiesLoaderSupport
org.springframework.beans.factory.config.PropertyResourceConfigurer
org.springframework.beans.factory.config.PlaceholderConfigurerSupport
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- BeanFactoryPostProcessor,- InitializingBean,- Ordered,- PriorityOrdered
@Deprecated
public class PreferencesPlaceholderConfigurer
extends PropertyPlaceholderConfigurer
implements InitializingBean
Deprecated.
Subclass of PropertyPlaceholderConfigurer that supports JDK 1.4's
 Preferences API (
java.util.prefs).
 Tries to resolve placeholders as keys first in the user preferences, then in the system preferences, then in this configurer's properties. Thus, behaves like PropertyPlaceholderConfigurer if no corresponding preferences defined.
Supports custom paths for the system and user preferences trees. Also supports custom paths specified in placeholders ("myPath/myPlaceholderKey"). Uses the respective root node if not specified.
- Since:
- 16.02.2004
- Author:
- Juergen Hoeller
- See Also:
- 
Field SummaryFields inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurerSYSTEM_PROPERTIES_MODE_FALLBACK, SYSTEM_PROPERTIES_MODE_NEVER, SYSTEM_PROPERTIES_MODE_OVERRIDEFields inherited from class org.springframework.beans.factory.config.PlaceholderConfigurerSupportDEFAULT_ESCAPE_CHARACTER, DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, escapeCharacter, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, trimValues, valueSeparatorFields inherited from class org.springframework.core.io.support.PropertiesLoaderSupportlocalOverride, localProperties, loggerFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidDeprecated.This implementation eagerly fetches the Preferences instances for the required system and user tree nodes.protected StringresolvePlaceholder(String path, String key, Preferences preferences) Deprecated.Resolve the given path and key against the given Preferences.protected StringresolvePlaceholder(String placeholder, Properties props) Deprecated.This implementation tries to resolve placeholders as keys first in the user preferences, then in the system preferences, then in the passed-in properties.voidsetSystemTreePath(String systemTreePath) Deprecated.Set the path in the system preferences tree to use for resolving placeholders.voidsetUserTreePath(String userTreePath) Deprecated.Set the path in the system preferences tree to use for resolving placeholders.Methods inherited from class org.springframework.beans.factory.config.PropertyPlaceholderConfigurerprocessProperties, resolvePlaceholder, resolveSystemProperty, setSearchSystemEnvironment, setSystemPropertiesMode, setSystemPropertiesModeNameMethods inherited from class org.springframework.beans.factory.config.PlaceholderConfigurerSupportdoProcessProperties, setBeanFactory, setBeanName, setEscapeCharacter, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setTrimValues, setValueSeparatorMethods inherited from class org.springframework.beans.factory.config.PropertyResourceConfigurerconvertProperties, convertProperty, convertPropertyValue, getOrder, postProcessBeanFactory, setOrderMethods inherited from class org.springframework.core.io.support.PropertiesLoaderSupportloadProperties, mergeProperties, setFileEncoding, setIgnoreResourceNotFound, setLocalOverride, setLocation, setLocations, setProperties, setPropertiesArray, setPropertiesPersister
- 
Constructor Details- 
PreferencesPlaceholderConfigurerpublic PreferencesPlaceholderConfigurer()Deprecated.
 
- 
- 
Method Details- 
setSystemTreePathDeprecated.Set the path in the system preferences tree to use for resolving placeholders. Default is the root node.
- 
setUserTreePathDeprecated.Set the path in the system preferences tree to use for resolving placeholders. Default is the root node.
- 
afterPropertiesSetpublic void afterPropertiesSet()Deprecated.This implementation eagerly fetches the Preferences instances for the required system and user tree nodes.- Specified by:
- afterPropertiesSetin interface- InitializingBean
 
- 
resolvePlaceholderDeprecated.This implementation tries to resolve placeholders as keys first in the user preferences, then in the system preferences, then in the passed-in properties.- Overrides:
- resolvePlaceholderin class- PropertyPlaceholderConfigurer
- Parameters:
- placeholder- the placeholder to resolve
- props- the merged properties of this configurer
- Returns:
- the resolved value, of nullif none
- See Also:
 
- 
resolvePlaceholder@Nullable protected String resolvePlaceholder(@Nullable String path, String key, Preferences preferences) Deprecated.Resolve the given path and key against the given Preferences.- Parameters:
- path- the preferences path (placeholder part before '/')
- key- the preferences key (placeholder part after '/')
- preferences- the Preferences to resolve against
- Returns:
- the value for the placeholder, or nullif none found
 
 
- 
PropertyPlaceholderConfigurer