上一页 1 ··· 8 9 10 11 12 13 14 下一页
摘要: 一、使用 1. 继承 HandlerInterceptor public interface HandlerInterceptor { // Handler 被调用前执行, 返回 false 则不再向下执行 default boolean preHandle(HttpServletRequest r 阅读全文
posted @ 2021-11-14 01:53 YangDanMua 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 源码版本 Spring5.3.x,SpringBoot版本2.5.x 仅讨论 RequestMappingHandlerMapping 这个处理注解的处理器映射器 一、自动配置 既然使用了SpringBoot,SpringMVC相关的东西肯定是被自动配置了的 1. WebMvcAutoConfigu 阅读全文
posted @ 2021-11-14 00:32 YangDanMua 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 一、SpringApplication 构造 run方法启动 public class SpringApplication { public static ConfigurableApplicationContext run(Class<?> primarySource, String... arg 阅读全文
posted @ 2021-10-24 01:56 YangDanMua 阅读(466) 评论(0) 推荐(0) 编辑
摘要: 一、相关的几个注解 @SpringBootConfiguration @EnableAutoConfiguration @ComponentScan(excludeFilters = { @Filter(type = FilterType.CUSTOM, classes = TypeExcludeF 阅读全文
posted @ 2021-10-22 20:36 YangDanMua 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 一、Spring处理配置类大致过程 回忆一下Spring处理配置类的大致过程【ConfigurationClassPostProcessor】 【BeanFactoryPostProcessor -> BeanDefinitionRegistryPostProcessor】 Configuratio 阅读全文
posted @ 2021-10-22 20:26 YangDanMua 阅读(952) 评论(0) 推荐(0) 编辑
摘要: 从自动配置开始看一下 组合注解@SpringBootApplication中的注解@EnableAutoConfiguration @Import(AutoConfigurationImportSelector.class) public @interface EnableAutoConfigura 阅读全文
posted @ 2021-10-22 16:20 YangDanMua 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 参考: 死磕 java集合 by 彤哥读源码 1. 概述 1.1 简介 CopyOnWriteArrayList是ArrayList的线程安全版本,内部也是通过数组实现,每次对数组的修改都完全拷贝一份新的数组来修改,修改完了再替换掉老数组,这样保证了只阻塞写操作,不阻塞读操作,实现读写分离。 1.2 阅读全文
posted @ 2020-04-19 12:33 YangDanMua 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 参考: 死磕 java集合 by 彤哥读源码 1. 概述 1.1 简介 ArrayList是一种以动态数组实现的List,能在常数时间内随机访问元素,但非尾部的插入和删除需要线性时间,需要移动元素 同时数组元素的存储在物理上是连续的,因此其存取可能极大得益于CPU缓存 1.2 继承体系 ArrayL 阅读全文
posted @ 2020-04-19 11:10 YangDanMua 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 1 包装类 & 装箱与拆箱 1.1 基本数据类型 & 包装器 基本数据类型及其包装器: 拆箱与装箱: 自动装箱是将基本数据类型转换为其包装类, 自动拆箱是将包装类调用其方法转换为基本数据类型 2. int类型的拆箱与装箱 2.1 实例 1 @Test 2 public void testEquals 阅读全文
posted @ 2019-12-03 17:32 YangDanMua 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 1. 放出源码 2. elementData与Object[] elementData的定义如下 transient Object[] elementData; // non-private to simplify nested class access 请看如下代码 package test; p 阅读全文
posted @ 2019-11-29 20:11 YangDanMua 阅读(946) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 下一页