上一页 1 2 3 4 5 6 ··· 18 下一页
摘要: Bootstrap#start() daemon = bootstrap, 所以调用的还是 org.apache.catalina.startup.Bootstrap#start() public void start() throws Exception { if (catalinaDaemon 阅读全文
posted @ 2020-08-23 11:18 Sniper_ZL 阅读(259) 评论(0) 推荐(0) 编辑
摘要: Bootstrap#load() daemon.load(args) 调用的, 其实就是 bootstrap.load(args) main方法中执行了 daemon = bootstrap; org.apache.catalina.startup.Bootstrap#load(): private 阅读全文
posted @ 2020-08-23 11:17 Sniper_ZL 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 代码片段: org.apache.catalina.startup.Bootstrap#main() if (daemon == null) { // Don't set daemon until init() has completed Bootstrap bootstrap = new Boot 阅读全文
posted @ 2020-08-23 11:16 Sniper_ZL 阅读(254) 评论(0) 推荐(0) 编辑
摘要: tomcat架构 从这张图上, 可以很明确的看出, 各个组件的关系 Server: 服务器, 也就是一个tomcat Service: 服务, 将多个 Connector 和 一个 Engine 组合起来, 成为一个服务. 1#Server -- n#Service Connector: 接收器, 阅读全文
posted @ 2020-08-23 11:13 Sniper_ZL 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 通过spring代码的阅读, 主体流程也就大概出来了. spring里面, 大量使用了后置处理器, 遍布了每个阶段: 实例化前后, 实例化, 属性注入, 初始化 说白了, 就是留了接口, 然后在不同的阶段, 遍历调用不同的接口定义的方法. 来进行一些功能的扩展. 如 aop 也是通过后置处理器, 在 阅读全文
posted @ 2020-07-30 13:48 Sniper_ZL 阅读(312) 评论(0) 推荐(0) 编辑
摘要: spring在初始化之后, 还调用了一次 Bean 的后置处理器. 代码片段: org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#applyBeanPostProcessorsAfterIniti 阅读全文
posted @ 2020-07-27 21:32 Sniper_ZL 阅读(1592) 评论(0) 推荐(0) 编辑
摘要: 代码片段: org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#applyBeanPostProcessorsBeforeInitialization @Override public Object 阅读全文
posted @ 2020-07-27 21:29 Sniper_ZL 阅读(2144) 评论(0) 推荐(0) 编辑
摘要: 当spring完成属性注入之后, 就要开始 bean 的初始化了 代码片段: org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#doCreateBean // Initialize the bea 阅读全文
posted @ 2020-07-27 21:28 Sniper_ZL 阅读(425) 评论(0) 推荐(0) 编辑
摘要: 示例 @Component public class IndexA { @Autowired IndexB bbb; public IndexA() { System.out.println("IndexA constructor..."); } public void printf(){ Syst 阅读全文
posted @ 2020-07-27 21:26 Sniper_ZL 阅读(3400) 评论(0) 推荐(1) 编辑
摘要: 代码片段: org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#populateBean boolean hasInstAwareBpps = hasInstantiationAwareBeanPo 阅读全文
posted @ 2020-07-27 21:25 Sniper_ZL 阅读(2020) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 18 下一页