上一页 1 2 3 4 5 6 7 8 ··· 18 下一页
摘要: 接 springIOC - ConfigurationClassPostProcessor - full / lite 代码块: org.springframework.context.annotation.ConfigurationClassPostProcessor#processConfigB 阅读全文
posted @ 2020-07-27 21:07 Sniper_ZL 阅读(468) 评论(0) 推荐(0)
摘要: 开始阅读 Import 源码之前, 也是需要些一些测试demo, 来帮助理解和调试 demo 建几个内容一样的类, 如: IndexDao1, IndexDao2, IndexDao3 其具体内容如下: public class IndexDao1 { public IndexDao1() { Sy 阅读全文
posted @ 2020-07-27 21:06 Sniper_ZL 阅读(394) 评论(0) 推荐(0)
摘要: 在接上一篇之前, 我想先写几个测试demo, 应该能帮助更好的理解. demo: com.study.elvinle.ioc.xml.IndexService: public class IndexService { private String name = "index";public Stri 阅读全文
posted @ 2020-07-27 21:05 Sniper_ZL 阅读(367) 评论(0) 推荐(0)
摘要: ConfigurationClassPostProcessor 首先看看他的类的关系: public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPostProcessor, PriorityOrder 阅读全文
posted @ 2020-07-27 20:48 Sniper_ZL 阅读(543) 评论(0) 推荐(0)
摘要: 接上一篇, 看 refresh() 方法. refresh org.springframework.context.support.AbstractApplicationContext#refresh 方法, 是一个非常强大的方法@Override public void refresh() thr 阅读全文
posted @ 2020-07-27 20:47 Sniper_ZL 阅读(467) 评论(0) 推荐(0)
摘要: 接着上一篇. 这里来看一下 register(componentClasses) register @Override public void register(Class<?>... componentClasses) { Assert.notEmpty(componentClasses, "At 阅读全文
posted @ 2020-07-27 20:46 Sniper_ZL 阅读(482) 评论(0) 推荐(0)
摘要: 前言 目前接触到所有的java框架中, 或多或少, 都需要spring, 有的是基于spring, 有的是需要与spring集成使用. 对于 spring , 就像是大厦的地基. 所以不能不看看这个地基是怎么建的. 以前也时常看 spring 源码, 都是一知半解的, 不知其真解. spring 太 阅读全文
posted @ 2020-07-27 20:44 Sniper_ZL 阅读(368) 评论(0) 推荐(0)
摘要: AIO是异步非阻塞io, 也叫 nio2.0. 直接上代码, server: public class Server implements Runnable { public AsynchronousServerSocketChannel assc; private CountDownLatch l 阅读全文
posted @ 2020-03-01 15:31 Sniper_ZL 阅读(491) 评论(0) 推荐(0)
摘要: 随着访问量越来越多, BIO 和 伪异步IO 已经不能满足需求了. 所以后面又出了个 NIO. 1. NIO 使用了一个 通道Channel 的概念, 他是一个双向通道, 可以读取和写入数据. 程序中使用的 SocketChannel 读写操作都是异步的, 没有读写的数据最直接返回. 2. NIO 阅读全文
posted @ 2020-03-01 15:29 Sniper_ZL 阅读(463) 评论(0) 推荐(0)
摘要: BIO的时候, 一个客户端对应服务器的一条线程, 比较耗线程资源. 在此基础上, 对起线程进行优化, 创建一个线程池, 对线程进行管理, 可以设置一个最大线程数 maxThreadCount. 这样, 达到线程可控的目的. 即使外面有远大于线程数的连接过来, 也不至于让服务器撑爆. 多出的客户端, 阅读全文
posted @ 2020-03-01 15:27 Sniper_ZL 阅读(384) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 18 下一页