java.lang.Object
org.springframework.beans.factory.access.BeanFactoryBootstrap
- public class BeanFactoryBootstrap
- extends java.lang.Object
One singleton to rule them all. Reads System properties, which
must contain the definition of a bootstrap bean factory using
the Properties syntax supported by PropertiesBeanDefinitionReader.
The name of the bootstrap factory must be "bootstrapBeanFactory".
Thus a typical definition might be:
bootstrapBeanFactory.class=com.mycompany.MyBeanFactory
Use as follows:
BeanFactory bf = BeanFactoryBootstrap.getInstance().getBeanFactory();
- Since:
- 02.12.2002
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BEAN_FACTORY_BEAN_NAME
public static final java.lang.String BEAN_FACTORY_BEAN_NAME
- See Also:
- Constant Field Values
instance
private static BeanFactoryBootstrap instance
startupException
private static org.springframework.beans.BeansException startupException
bootstrapFactory
private org.springframework.beans.factory.BeanFactory bootstrapFactory
- the singleton instance
BeanFactoryBootstrap
private BeanFactoryBootstrap()
throws org.springframework.beans.BeansException
- Apply rules to load factory.
initializeSingleton
private static void initializeSingleton()
getInstance
public static BeanFactoryBootstrap getInstance()
throws org.springframework.beans.BeansException
- Return the singleton instance of the bootstrap factory
reinitialize
protected static void reinitialize()
- For testing only. Cleans and reinitalizes the instance.
Do not use in a production application!
getBeanFactory
public org.springframework.beans.factory.BeanFactory getBeanFactory()
- Return the BeanFactory managed by the Bootstrap.