首页 > 代码库 > Spring Beans Configurations
Spring Beans Configurations
Bean Properties
a) Bean property can be set by <Property> syntax.
b) Bean property can be set by p:xxx syntex.
c) Arbitrary properties can be set by <list> or <props> or <map> according to the property type.
Bean Destory
a) Destory method will be called when the ApplicationContext is closed.
b) Destory method will only be called when the bean scope is "singleton".
Bean Factory
a) The default bean factory is the matched constructor method of the class.
b) The factory method can be assigned to a static method of the class.
c) The factory method can be assigned to a method of another class (factory class). The factory class also has to be added as a bean.
Bean Nest
a) Bean can be defined within a bean, which will be inner bean. The inner bean can‘t be refered outside its parent bean.
Spring Beans Configurations