1.核心组件IOC[]容器 Aop面向切面编程
2.优势
方法的解耦 简化开发
Aop技术的支持
提供声明事务的支持
Junit单元测试
方便整合其他框架[Mybatis, SpringMVC, SpringBoot, SpringCloud,Redis...]
降低JavaEE api开发使用的难度[封装]
3.SpringBoot 底层基于Spring/SpringMVC注解化方式进行包装
4.IOC容器基本概念;控制反转[inversion of control] 核心接口 BeanFactory
把对象的创建过程和使用统一交给我们的spring进行管理-不需要开发者new
5.IOC底层实现技术:1.解析xml 2.工厂模式 3.反射技术
1.解析xml
//加载spring配置文件 -- 解析xml配置文件
ClassPathXmlApplicationContext classPathXmlApplicationContext =
new ClassPathXmlApplicationContext("spring.xml");
2.反射技术
<!--
作业:new出UserEntity
id唯一标识
class="com.zzy.entity.UserEntity"使用反射技术初始化对象
-->
<bean id="userEntity" class="com.zzy.entity.UserEntity"></bean>
-