Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » beans » factory » config » [javadoc | source]
org.springframework.beans.factory.config
abstract public class: PropertyResourceConfigurer [javadoc | source]
java.lang.Object
   org.springframework.core.io.support.PropertiesLoaderSupport
      org.springframework.beans.factory.config.PropertyResourceConfigurer

All Implemented Interfaces:
    PriorityOrdered, BeanFactoryPostProcessor

Direct Known Subclasses:
    PropertyPlaceholderConfigurer, ServletContextPropertyPlaceholderConfigurer, PropertyOverrideConfigurer, PreferencesPlaceholderConfigurer

Allows for configuration of individual bean property values from a property resource, i.e. a properties file. Useful for custom config files targetted at system administrators that override bean properties configured in the application context.

Two concrete implementations are provided in the distribution:

Property values can be converted after reading them in, through overriding the #convertPropertyValue method. For example, encrypted values can be detected and decrypted accordingly before processing them.

Fields inherited from org.springframework.core.io.support.PropertiesLoaderSupport:
XML_FILE_EXTENSION,  logger
Method from org.springframework.beans.factory.config.PropertyResourceConfigurer Summary:
convertProperties,   convertPropertyValue,   getOrder,   postProcessBeanFactory,   processProperties,   setOrder
Methods from org.springframework.core.io.support.PropertiesLoaderSupport:
loadProperties,   mergeProperties,   setFileEncoding,   setIgnoreResourceNotFound,   setLocalOverride,   setLocation,   setLocations,   setProperties,   setPropertiesArray,   setPropertiesPersister
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.beans.factory.config.PropertyResourceConfigurer Detail:
 protected  void convertProperties(Properties props) 
    Convert the given merged properties, converting property values if necessary. The result will then be processed.

    The default implementation will invoke #convertPropertyValue for each property value, replacing the original with the converted value.

 protected String convertPropertyValue(String originalValue) 
    Convert the given property value from the properties source to the value that should be applied.

    The default implementation simply returns the original value. Can be overridden in subclasses, for example to detect encrypted values and decrypt them accordingly.

 public int getOrder() 
 public  void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException 
 abstract protected  void processProperties(ConfigurableListableBeanFactory beanFactory,
    Properties props) throws BeansException
    Apply the given Properties to the given BeanFactory.
 public  void setOrder(int order)