According to the configuration of bean in Spring, BeanFactory generates Bean's method to divide three:
1) Direct constructing this is the most common method, in which case we need a default constructor and the corresponding setters / getters method. For example: What should be noted that we can deliver parameters (with preperties tags) for the getter / setter method, or to deliver parameters for constructor (with a constructor tag).
2) Use static factory methods such as: This is required to have a static method CreateInstance
3) Non-static factory method bean> here However, there must be no "class" tag, factory-bean is BeanFactory, Factory-Method is its non-static method, pay attention, MyFactoryBean can manage and configure through the container.