- 博客(5)
- 收藏
- 关注
原创 Mybatis源码(一):SqlSessionFactory
在Mybatis中,SqlSessionFactory 是一个重要对象,用来创建 SqlSession,而 SqlSession 是用来操作数据库的。一. SqlSessionFactory 的生成我们先来看一段代码: private static SqlSessionFactory sqlMapper; @BeforeAll static void setup() throws Exception { createBlogDataSource(); final Strin
2021-03-21 23:26:01 169
原创 Spring源码阅读-CustomAutowireConfigurer
Spring源码阅读-CustomAutowireConfigurer一、配置自定义自动装配类,CustomAutowireConfigurer是一个BeanFactoryPostProcessor,允许方便地注册自定义autowire限定符类型。即使没有使用Spring的@Qualifier注解可以看到CustomAutowireConfigurer实现了BeanFactoryPostPr...
2019-08-29 11:08:45 1237
原创 Spring源码阅读-@Autowired及其实现
Spring源码阅读-@Autowired及其实现1.@Autowired注解源码Autowired注解可以应用在构造方法,普通方法,参数,字段,以及注解这五种类型的地方,它的保留策略是在运行时@Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD, Elem...
2019-08-28 16:14:56 502
原创 Spring源码阅读-AnnotationBeanUtils
spring源码阅读-AnnotationBeanUtils/** * General utility methods for working with annotations in JavaBeans style. * 用于在JavaBeans样式中使用注释的常规实用程序方法。 * * @author Rob Harrop * @author Juergen Hoeller * @...
2019-08-28 15:13:12 208
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人