
springboot
will way
这个作者很懒,什么都没留下…
展开
-
springboot启动过程(1)- 初始化
1. springboot启动时,只需要调用一个类前面加了@SpringBootApplication的main函数,执行SpringApplication.run(DemoApplication.class, args)即可,这里初始化了一个SpringApplication实例,然后调用run启动springboot。run方法中,调用了initialize,如下:@SuppressWar...转载 2019-07-18 21:54:36 · 219 阅读 · 0 评论 -
springboot启动过程(2)-run方法
1 springApplication的runrun方法主要是用于创造spring容器ConfigurableApplicationContext对象。public ConfigurableApplicationContext run(String... args) { StopWatch stopWatch = new StopWatch(); // 构造一个任务执行观察器 stop...转载 2019-07-18 22:10:27 · 734 阅读 · 0 评论 -
springboot启动过程(3)-refresh方法
1 springboot在启动的时候,会调用run方法,创建环境设置spring容器,其中包含refresh方法,完成配置类解析,各种beanFactoryPostProcess和beanPostProcessor注册,web内置容器构造,国际化配置初始化等,refresh调用了父类AbstractApplicationContext的refresh方法如下。public void refre...转载 2019-07-18 22:25:56 · 2041 阅读 · 0 评论