| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.springframework.beans.factory.support.AbstractBeanDefinitionReader | +--org.springframework.beans.factory.support.PropertiesBeanDefinitionReader
Bean definition reader for a simple properties format. Provides bean definition registration methods for Map/Properties and ResourceBundle. Typically applied to a DefaultListableBeanFactory.
Field Summary | |
final static String | CLASS_KEY Prefix for the class property of a root bean definition. |
final static String | LAZY_INIT_KEY Special string added to distinguish owner.(lazy-init)=true Default is false. |
final static String | PARENT_KEY Reserved "property" to indicate the parent of a child bean definition. |
final static String | REF_PREFIX Prefix before values referencing other beans. |
final static String | REF_SUFFIX Property suffix for references to other beans in the current BeanFactory: e.g. |
final static String | SEPARATOR Separator between bean name and property name. |
final static String | SINGLETON_KEY Special string added to distinguish owner.(singleton)=true Default is true. |
final static String | TRUE_VALUE Value of a T/F attribute that represents true. |
Constructor Summary | |
PropertiesBeanDefinitionReader(BeanDefinitionRegistry beanFactory) Create new PropertiesBeanDefinitionReader for the given bean factory. |
Method Summary | |
String | getDefaultParentBean() Return the default parent bean for this bean factory. |
int | loadBeanDefinitions(Resource resource) Load bean definitions from the specified properties file, using all property keys (i.e. |
int | loadBeanDefinitions(Resource resource, String prefix) Load bean definitions from the specified properties file. |
int | registerBeanDefinitions(ResourceBundle rb) Register bean definitions contained in a resource bundle, using all property keys (i.e. |
int | registerBeanDefinitions(ResourceBundle rb, String prefix) Register bean definitions contained in a ResourceBundle. |
int | registerBeanDefinitions(Map m) Register bean definitions contained in a Map, using all property keys (i.e. |
int | registerBeanDefinitions(Map m, String prefix) Register bean definitions contained in a Map. |
int | registerBeanDefinitions(Map m, String prefix, String resourceDescription) Register bean definitions contained in a Map. |
void | setDefaultParentBean(String defaultParentBean) Set the default parent bean for this bean factory. |
Methods inherited from class org.springframework.beans.factory.support.AbstractBeanDefinitionReader |
getBeanClassLoader, getBeanFactory, setBeanClassLoader |
Field Detail |
public final static String CLASS_KEY
public final static String LAZY_INIT_KEY
public final static String PARENT_KEY
public final static String REF_PREFIX
public final static String REF_SUFFIX
public final static String SEPARATOR
public final static String SINGLETON_KEY
public final static String TRUE_VALUE
Constructor Detail |
public PropertiesBeanDefinitionReader(BeanDefinitionRegistry beanFactory)
Method Detail |
public String getDefaultParentBean()
public int loadBeanDefinitions(Resource resource)
public int loadBeanDefinitions(Resource resource, String prefix)
public int registerBeanDefinitions(ResourceBundle rb)
throws org.springframework.beans.factory.BeanDefinitionStoreException
public int registerBeanDefinitions(ResourceBundle rb, String prefix)
throws org.springframework.beans.factory.BeanDefinitionStoreException
Similar syntax as for a Map. This method is useful to enable standard Java internationalization support.
public int registerBeanDefinitions(Map m)
throws org.springframework.beans.BeansException
public int registerBeanDefinitions(Map m, String prefix)
throws org.springframework.beans.BeansException
employee.class=MyClass // special property
//employee.abstract=true // this prototype can't be instantiated directly
employee.group=Insurance Services // real property
employee.usesDialUp=false // default unless overriden
employee.manager(ref)=tony // reference to another prototype defined in the same file
// cyclic and unresolved references will be detected
salesrep.parent=employee
salesrep.department=Sales and Marketing
techie.parent=employee
techie.department=Software Engineering
techie.usesDialUp=true // overridden property
public int registerBeanDefinitions(Map m, String prefix, String resourceDescription)
throws org.springframework.beans.BeansException
public void setDefaultParentBean(String defaultParentBean)
Can be used e.g. for view definition files, to define a parent with common attributes for all views.
Association Links |
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |