码迷,mamicode.com
首页 > 编程语言 > 详细

Spring Beans Configurations

时间:2016-09-25 22:14:33      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:

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

标签:

原文地址:http://www.cnblogs.com/funnybear/p/5906945.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!