类 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
- 所有已实现的接口:
Aware
,BeanFactoryAware
,BeanNameAware
,BeanFactoryPostProcessor
,InitializingBean
,Ordered
,PriorityOrdered
@Deprecated public class PreferencesPlaceholderConfigurer extends PropertyPlaceholderConfigurer implements InitializingBean
已过时。as of 5.2, along withPropertyPlaceholderConfigurer
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.
- 从以下版本开始:
- 16.02.2004
- 作者:
- Juergen Hoeller
- 另请参阅:
setSystemTreePath(java.lang.String)
,setUserTreePath(java.lang.String)
,Preferences
字段概要
从类继承的字段 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
SYSTEM_PROPERTIES_MODE_FALLBACK, SYSTEM_PROPERTIES_MODE_NEVER, SYSTEM_PROPERTIES_MODE_OVERRIDE
从类继承的字段 org.springframework.beans.factory.config.PlaceholderConfigurerSupport
DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, ignoreUnresolvablePlaceholders, nullValue, placeholderPrefix, placeholderSuffix, trimValues, valueSeparator
从类继承的字段 org.springframework.core.io.support.PropertiesLoaderSupport
localOverride, localProperties, logger
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 PreferencesPlaceholderConfigurer()
已过时。
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
已过时。This implementation eagerly fetches the Preferences instances for the required system and user tree nodes.protected String
resolvePlaceholder(String path, String key, Preferences preferences)
已过时。Resolve the given path and key against the given Preferences.protected String
resolvePlaceholder(String placeholder, Properties props)
已过时。This implementation tries to resolve placeholders as keys first in the user preferences, then in the system preferences, then in the passed-in properties.void
setSystemTreePath(String systemTreePath)
已过时。Set the path in the system preferences tree to use for resolving placeholders.void
setUserTreePath(String userTreePath)
已过时。Set the path in the system preferences tree to use for resolving placeholders.从类继承的方法 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
processProperties, resolvePlaceholder, resolveSystemProperty, setSearchSystemEnvironment, setSystemPropertiesMode, setSystemPropertiesModeName
从类继承的方法 org.springframework.beans.factory.config.PlaceholderConfigurerSupport
doProcessProperties, setBeanFactory, setBeanName, setIgnoreUnresolvablePlaceholders, setNullValue, setPlaceholderPrefix, setPlaceholderSuffix, setTrimValues, setValueSeparator
从类继承的方法 org.springframework.beans.factory.config.PropertyResourceConfigurer
convertProperties, convertProperty, convertPropertyValue, getOrder, postProcessBeanFactory, setOrder
从类继承的方法 org.springframework.core.io.support.PropertiesLoaderSupport
loadProperties, mergeProperties, setFileEncoding, setIgnoreResourceNotFound, setLocalOverride, setLocation, setLocations, setProperties, setPropertiesArray, setPropertiesPersister
构造器详细资料
PreferencesPlaceholderConfigurer
public PreferencesPlaceholderConfigurer()
已过时。
方法详细资料
setSystemTreePath
public void setSystemTreePath(String systemTreePath)
已过时。Set the path in the system preferences tree to use for resolving placeholders. Default is the root node.
setUserTreePath
public void setUserTreePath(String userTreePath)
已过时。Set the path in the system preferences tree to use for resolving placeholders. Default is the root node.
afterPropertiesSet
public void afterPropertiesSet()
已过时。This implementation eagerly fetches the Preferences instances for the required system and user tree nodes.- 指定者:
afterPropertiesSet
在接口中InitializingBean
resolvePlaceholder
protected String resolvePlaceholder(String placeholder, Properties props)
已过时。This implementation tries to resolve placeholders as keys first in the user preferences, then in the system preferences, then in the passed-in properties.- 覆盖:
resolvePlaceholder
在类中PropertyPlaceholderConfigurer
- 参数:
placeholder
- the placeholder to resolveprops
- the merged properties of this configurer- 返回:
- the resolved value, of
null
if none - 另请参阅:
PropertyPlaceholderConfigurer.setSystemPropertiesMode(int)
resolvePlaceholder
@Nullable protected String resolvePlaceholder(@Nullable String path, String key, Preferences preferences)
已过时。Resolve the given path and key against the given Preferences.- 参数:
path
- the preferences path (placeholder part before '/')key
- the preferences key (placeholder part after '/')preferences
- the Preferences to resolve against- 返回:
- the value for the placeholder, or
null
if none found