1.IOC及Bean容器














2.Spring 注入


<必须要有get/set方法> < property name=”” ref=””>
⭐️
* name= 当前Bean中class所在的类的注入的属性的 成员变量名


* ref=表示引用 下一个的ID值


** <必须要有构造器方法>
3.实战–IOC
3.1传统的new 方式实现接口编程


3.2使用Bean开发




3.2 set注入
1.Dao层


2.service层



3.3 构造方法注入





















⭐️




** <必须要有构造器方法>






1.Dao层


2.service层








Author: John Doe
Permalink: http://yoursite.com/2018/12/04/Spring/1.SpringIOC/
License: Copyright (c) 2019 CC-BY-NC-4.0 LICENSE
Slogan: Do you believe in DESTINY?