依赖注入(DI)
摘要:•Spring 支持 3 种依赖注入的方式–属性注入–构造器注入–工厂方法注入(不推荐)属性注入:•属性注入即通过 setter 方法注入Bean 的属性值或依赖的对象•属性注入使用 元素, 使用 name 属性指定 Bean 的属性名称,value 属性或 子节点指定属性值1 2 ...
阅读全文
posted @ 2014-12-06 14:04
posted @ 2014-12-06 14:04
posted @ 2014-12-06 13:41
posted @ 2014-12-06 13:38
posted @ 2014-12-06 09:57
posted @ 2014-12-05 15:26
posted @ 2014-12-05 10:13