因为是手写模拟Spring代码,所以没有特殊的笔记,请直接看视频,建议同学们抽空自己也写一个Spring出来,加深理解。
git clone地址:https://gitee.com/archguide/zhouyu-spring.git
课程内容:
通过手写模拟,了解Spring的底层源码启动过程
通过手写模拟,了解BeanDefinition、BeanPostProcessor的概念
通过手写模拟,了解Spring解析配置类等底层源码工作流程
通过手写模拟,了解依赖注入,Aware回调等底层源码工作流程
通过手写模拟,了解Spring AOP的底层源码工作流程
aa
// 1. 创建容器
LiaoHaoApplicationContext applicationContext = new LiaoHaoApplicationContext(AppConfig.class);
// 从容器中获取对象
UserService userService = (UserService) applicationContext.getBean("userService");
// 使用对象
userService.test();