前面两篇文章分析了super(this)和setConfigLocations(configLocations)的源代码,本文来分析下refresh的源码, Spring加载流程源码分析01[super] Spring加载流程源码分析02[setConfigLocations] 先来看下ClassPathXmlApplicationContext类的初始化过程: public ClassPathXmlApplicationContext(String[] configLocations, b…
我们知道启动spring容器两常见的两种方式(其实都是加载spring容器的xml配置文件时启动的): 1.在应用程序下加载 ApplicationContext ctx = new ClassPathXmlApplicationContext("spring-context.xml"); 2.web模式下加载 <context-param> <param-name>contextConfigLocation</param-name> <par…
Android系统采用OpenGL绘制3D图形,使用skia来绘制二维图形:OpenGL源码位于: frameworks/native/opengl frameworks/base/opengl 本文简单介绍OpenGL库的加载过程.OpenGL以动态库的方式提供,因此在使用OpenGL的接口函数绘图前,需要加载OpenGL库,并得到接口函数指针.函数EGLBoolean egl_init_drivers()就是负责OpenGL库的加载. EGLBoolean egl_init_drivers(…
spring boot 加载web容器tomcat流程源码分析 我本地的springboot版本是2.5.1,后面的分析都是基于这个版本 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.5.1</version> <relativePa…
springboot 事务创建流程源码分析 目录 springboot 事务创建流程源码分析 1. 自动加载配置 2. InfrastructureAdvisorAutoProxyCreator类 3.BeanFactoryTransactionAttributeSourceAdvisor类 4.判断bean对象是否需要进行事务增强处理 5.生成对应代理类 6. 最终生成的代理类class反编译 springboot中事务是相对重要的一个部分.也是aop的一个使用场景.我们今天就来一起从源码的角…
以下内容为原创,欢迎转载,转载请注明 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/5017056.html 从Launcher开始启动App流程源码分析 com.android.launcher.Launcher就是我们的Launcher页面了,可以看到Launcher其实也是一个Activity: public final class Launcher extends Activity implements View.OnClickListe…
以下内容为原创,欢迎转载,转载请注明 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/5013863.html Android系统启动流程源码分析 首先我们知道,Android是基于Linux的,当Linux内核加载完成时就会自动启动一个init的进程. 又因为我们每当我们启动一个App时,就会生成一个新的dalvik实例,并处于一个新的进程(当然一个App也可能是多进程的). 当我们打开第一个App的时候,就会通过init进程fork出一个zyg…
上篇<Spark(四十九):Spark On YARN启动流程源码分析(一)>我们讲到启动SparkContext初始化,ApplicationMaster启动资源中,讲解的内容明显不完整. 本章将针对yarn-cluster(--master yarn –deploy-mode cluster)模式下全面进行代码补充解读: 1)什么时候初始化SparkContext: 2)如何实现ApplicationMaster如何启动executor: 3)启动后如何通过rpc实现executor与dr…
Springboot 加载配置文件源码分析 本文的分析是基于springboot 2.2.0.RELEASE. 本篇文章的相关源码位置:https://github.com/wbo112/blogdemo/tree/main/springbootdemo/springboot-profiles springboot加载配置文件如application.yml是通过org.springframework.boot.context.config.ConfigFileApplicationListen…
ElasticSearch 启动时加载 Analyzer 源码分析 本文介绍 ElasticSearch启动时如何创建.加载Analyzer,主要的参考资料是Lucene中关于Analyzer官方文档介绍.ElasticSearch6.3.2源码中相关类:AnalysisModule.AnalysisPlugin.AnalyzerProvider.各种Tokenizer类和它们对应的TokenizerFactory.另外还参考了一个具体的基于ElasticSearch采用HanLP进行中文分词的…