com.interface21.context.support
Class PropertyResourceConfigurer
java.lang.Object
|
+--com.interface21.context.support.PropertyResourceConfigurer
- All Implemented Interfaces:
- ApplicationListener, java.util.EventListener
- public class PropertyResourceConfigurer
- extends java.lang.Object
- implements ApplicationListener
Allows for configuration of individual bean properties from a
property resource, e.g. a properties file.
Useful for custom config files targetted at system administrators
that override bean properties configured in the application context.
Expects configuration lines of the following form:
beanName.property=value
- Since:
- 12.03.2003
- Author:
- Juergen Hoeller
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyResourceConfigurer
public PropertyResourceConfigurer()
setLocation
public void setLocation(java.lang.String location)
- Set the location of the properties file. Allows for both a URL
and a (file) path, according to the respective ApplicationContext.
- See Also:
ApplicationContext.getResourceAsStream(java.lang.String)
onApplicationEvent
public void onApplicationEvent(ApplicationEvent e)
- Description copied from interface:
ApplicationListener
- Handle an application event
- Specified by:
onApplicationEvent in interface ApplicationListener
- Following copied from interface:
com.interface21.context.ApplicationListener
- Parameters:
e - event to respond to
processKey
protected void processKey(BeanFactory factory,
java.lang.String key,
java.lang.String value)
Rod Johnson and Spring contributors 2001-2003.