当前位置: 首页 > news >正文

赣州网站建设方案考研最靠谱的培训机构

赣州网站建设方案,考研最靠谱的培训机构,长春百度关键词推广,成都网站营销推广公司1.寻找spring.factories配置文件对应的监听器,主要要写监听器的全路径名,不然反射会报错 SpringBoot底层是如何读取META-INF/spring.factories的配置的? 1.遍历所有jar下的META-INF/spring.factories配置文件 2.读取配置文件下的所有属性&a…

1.寻找spring.factories配置文件对应的监听器,主要要写监听器的全路径名,不然反射会报错

 

 

 SpringBoot底层是如何读取META-INF/spring.factories的配置的?

1.遍历所有jar下的META-INF/spring.factories配置文件

2.读取配置文件下的所有属性,放入map

3.配置文件主要来源于,

3.1.开发者自己放的 

 

 3.2 spring-boot的配置文件 

3.spring-boot-autoconfiguration配置文件

读取完后放入缓存中,主要有13个大类,分别是:

org.springframework.context.ApplicationListener             2个值

======================spring-boot================================

org.springframework.boot.env.PropertySourceLoader           2个值
org.springframework.boot.SpringApplicationRunListener       1个值
org.springframework.boot.SpringBootExceptionReporter        1个值
org.springframework.context.ApplicationContextInitializer   4个值
org.springframework.context.ApplicationListener             9个值
org.springframework.boot.env.EnvironmentPostProcessor       3个值
org.springframework.boot.diagnostics.FailureAnalyzer        13个值
org.springframework.boot.diagnostics.FailureAnalysisReporter  1个值

==================spring-boot-autoconfiguration================================

org.springframework.context.ApplicationContextInitializer  2个值
org.springframework.context.ApplicationListener            1个值
org.springframework.boot.autoconfigure.AutoConfigurationImportListener  1个值
org.springframework.boot.autoconfigure.AutoConfigurationImportFilter  3个值
org.springframework.boot.autoconfigure.EnableAutoConfiguration       118个值
org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider 5个值

3个配置文件合并后,

ApplicationContextInitializer  6个值

ApplicationListener               12个值

SpringApplicationRunListener  1个

总共13大类

打开断点看看结果是否匹配:刚好6个,完全匹配

 

12个监听器:刚好完全匹配

 获取运行时监听器,刚好1个,完全匹配

org.springframework.boot.SpringApplication#getRunListeners

 org.springframework.boot.SpringApplicationRunListeners#starting

发布一个容器启动事件

 这里有四个监听器在监听容器启动事件

 

http://www.zhongyajixie.com/news/5388.html

相关文章:

  • 《营销型网站建设实战》成都业务网络推广平台
  • 公司做网站提供资料pc网站优化排名
  • iis怎么建设网站离我最近的广告公司
  • 库存网站建设定制信息发布
  • 江西求做网站企业网址怎么注册
  • 初学ssm做的网站南宁求介绍seo软件
  • 北京市网站建设 维护推荐seo公司发展前景
  • 成都网站建设优秀公司seo接单平台
  • 中英文网站怎么做的sem代运营托管公司
  • 网站怎么做关键词搜索排面链接交换公司
  • 布吉网站开发黑马培训是正规学校吗
  • 网站关键词描述字数客户推广渠道有哪些
  • 黔西南州做网站聊石家庄seo
  • 成都cms建站推广品牌的方法
  • seo做网站赚钱吗关键词推广软件排名
  • 龙游手机网站制作优化大师平台
  • wordpress注册会员插件网站快速优化排名app
  • 淘宝客网站源码和模版有什么区别对网络营销的认识800字
  • 优化服务seo咨询常德
  • 网站上传图片尺寸免费推广引流app
  • 广州专业网站建设有哪些百度热线电话
  • 外贸平台免费网站网络推广主要内容
  • 代做毕业设计比较靠谱的网站百度权重网站排名
  • 360建筑招聘网官网青岛网站seo推广
  • 潍坊网站建设公司排名短视频新媒体推广
  • 前端只是做网站吗seo优化师就业前景
  • 石家庄建站外贸网站滕州今日头条新闻
  • 做投票链接网站关键词你们懂的
  • 做奥迪汽车网站毕业论文在线数据分析网站
  • wordpress论坛程序关键词优化心得