- 博客(7)
- 收藏
- 关注
原创 SpringBoot启动流程(七):最后的处理
SpringBoot启动流程(七)之前我们看了SpringBoot的Context初始化和加载,下面继续研究启动流程:前略: afterRefresh(context, applicationArguments); stopWatch.stop(); if (this.logStartupInfo) { new StartupInfoLogger(thi...
2019-01-23 14:49:21 480
原创 Springboot启动流程(六):Context的流程
Springboot启动流程(六)之前看了context的创建,下面根据经验应该是prepare等等操作:回到SpringApplication类:public ConfigurableApplicationContext run(String... args) { // 省略前面看过的代码 try{ exceptionReporters = getSprin...
2019-01-23 14:48:40 1284
原创 Springboot启动流程(五):Context
Springboot启动流程(五)前面我们看了Spring的environment和banner.下面就到了同样重要的Context,Context是做什么的?我的理解就是存放上下文需要用到的对象的,Spring是单利模式所以我们获取的对象要放在一块儿地方供以后调用,这个地方就是Context接下来我们看下创建context的具体流程:Application 类public Config...
2019-01-21 17:25:23 693
原创 SpringBoot启动流程(四):banner和其他小功能
前面我们看了spring加载配置文件private ConfigurableEnvironment prepareEnvironment( SpringApplicationRunListeners listeners, ApplicationArguments applicationArguments) { // Create and configure...
2019-01-21 17:24:21 749
原创 Springboot启动流程(三):environment
Springboot启动流程(三)之前我们研究了springboot启动流程中的listener的运行流程,接下来就该是各种环境的出事话包括environment和context这两个非常重要的spring环境首先还是run方法的代码:run方法代码如下:public ConfigurableApplicationContext run(String... args) { // l...
2019-01-21 17:23:20 1454 4
原创 Springboot启动流程(二):listener的启动
Springboot启动流程(二)之前我们看了Application的赋值流程,之后的run方法调用才是启动流程的重点:run方法代码如下:public ConfigurableApplicationContext run(String... args) { StopWatch stopWatch = new StopWatch(); stopWatch.start(); ...
2019-01-21 17:20:57 1557
原创 Springboot 启动流程(一):Application对象的创建
Springboot 启动流程(一):springboot启动时电泳main方法的SpringApplication.run()方法传入class和main方法的args对象在底层调用了run方法:public static ConfigurableApplicationContext run(Class<?> primarySource, String....
2019-01-21 17:16:52 419
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人