| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Allows for making a properties file from a classpath location available as Properties instance in a bean factory. Can be used for to populate any bean property of type Properties via a bean reference.
Supports loading from a properties file and/or setting local properties on this FactoryBean. The created Properties instance will be merged from loaded and local values. If neither a location nor local properties are set, an exception will be thrown on initialization.
Can create a singleton or a new object on each request. Default is singleton.
| Method Summary | |
void | afterPropertiesSet()Create a singleton instance on initialization if in singleton mode. |
Object | getObject()Return either singleton instance or newly created instance, depending on the singleton property of this FactoryBean. |
Class | getObjectType() |
boolean | isSingleton() |
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 | setProperties(Properties properties)Set local properties, e.g. |
void | setSingleton(boolean singleton)Set if a singleton should be created, or a new object on each request else. |
| Method Detail |
public void afterPropertiesSet()
throws java.io.IOException
public Object getObject()
throws java.io.IOException
public Class getObjectType()
public boolean isSingleton()
public void setLocation(Resource location)
public void setLocations(Resource[] locations)
public void setProperties(Properties properties)
public void setSingleton(boolean singleton)
| Association Links |
to Class org.springframework.core.io.Resource
to Class java.util.Properties
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||