环境
1.使用JDK1.8 +
2.eclipse4.12(2019-06版本)
3 .sts-3.9.9(下载地址 https://spring.io/tools3/sts/all )
4.eclipse 中安装 sts
5添加spring依赖包
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.1.9.RELEASE</version>
</dependency>
6.使用sts插件编写第一个applicationcontext.xml
关于spring的依赖注入或称控制反转的方式:是将bean 放到spring容器,容器负责new 和set() 方法 初始化和实例化bean,然后通过spring容器提供的接口get方法 获取bean