首页 > 移动平台 > 详细

mybatis加载mapper接口过程

时间:2020-09-07 22:59:34      阅读:602      评论:0      收藏:0      [点我收藏+]
spring中mybatis加载mapper接口过程

一、使用注解@MapperScan开始

org.mybatis.spring.annotation.MapperScan

org.mybatis.spring.annotation.MapperScannerRegistrar

  • org.springframework.context.annotation.ImportBeanDefinitionRegistrar

    registerBeanDefinitions

二、注册mapper声明的接口的回调入口 loadBeanDefinitionsFromRegistrars

org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader

←loadBeanDefinitionsForConfigurationClass←loadBeanDefinitions

org.springframework.context.annotation.ConfigurationClassPostProcessor

←postProcessBeanDefinitionRegistry或postProcessBeanFactory回调

org.springframework.context.annotation.AnnotationConfigUtils

←registerAnnotationConfigProcessors

org.springframework.context.annotation.AnnotatedBeanDefinitionReader

←AnnotatedBeanDefinitionReader(org.springframework.beans.factory.support.BeanDefinitionRegistry, org.springframework.core.env.Environment)

org.springframework.web.context.support.AnnotationConfigWebApplicationContext

←getAnnotatedBeanDefinitionReader←loadBeanDefinitions

←org.springframework.context.support.AbstractRefreshableApplicationContext#loadBeanDefinitions

org.springframework.context.support.AbstractApplicationContext

←refreshBeanFactory←obtainFreshBeanFactory←refresh

mybatis加载mapper接口过程

原文:https://www.cnblogs.com/windlog/p/13629610.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!