|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.beans.factory.config.PropertyResourceConfigurer
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.
2 concrete implementations are provided in the distribution:
PropertyOverrideConfigurer
,
PropertyPlaceholderConfigurer
Field Summary | |
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
PropertyResourceConfigurer()
|
Method Summary | |
int |
getOrder()
Return the order value of this object, higher value meaning greater in terms of sorting. |
void |
postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
Modify the application context's internal bean factory after its standard initialization. |
protected abstract void |
processProperties(ConfigurableListableBeanFactory beanFactory,
java.util.Properties props)
Apply the given Properties to the bean factory. |
void |
setIgnoreResourceNotFound(boolean ignoreResourceNotFound)
Set if failure to find the property resource should be ignored. |
void |
setLocation(Resource location)
Set a location of a properties file to be loaded. |
void |
setLocations(Resource[] locations)
Set locations of properties files to be loaded. |
void |
setOrder(int order)
|
void |
setProperties(java.util.Properties properties)
Set local properties, e.g. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final org.apache.commons.logging.Log logger
Constructor Detail |
public PropertyResourceConfigurer()
Method Detail |
public void setOrder(int order)
public int getOrder()
Ordered
Higher value can be interpreted as lower priority, consequently the first object has highest priority (somewhat analogous to Servlet "load-on-startup" values).
getOrder
in interface Ordered
public void setProperties(java.util.Properties properties)
public void setLocation(Resource location)
public void setLocations(Resource[] locations)
public void setIgnoreResourceNotFound(boolean ignoreResourceNotFound)
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException
BeanFactoryPostProcessor
postProcessBeanFactory
in interface BeanFactoryPostProcessor
beanFactory
- the bean factory used by the application context
BeansException
- in case of errorsprotected abstract void processProperties(ConfigurableListableBeanFactory beanFactory, java.util.Properties props) throws BeansException
beanFactory
- the bean factory used by the application contextprops
- the Properties to apply
BeansException
- in case of errors
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |