专题文章
时长:00:00更新时间:2022-11-15 17:42:13
当我们运行SpringApplication的main方法时,调用静态方法run()首先是实例化,SpringApplication初始化的时候主要做主要做三件事。1、根据classpath下是否存在(ConfigurableWebApplicationContext)判断是否要启动一个web applicationContext。2、SpringFactoriesInstances加载classpath下所有可用的ApplicationContextInitializer。3、SpringFactoriesInstances加载classpath下所有可用的ApplicationListener。
查看详情