zoukankan      html  css  js  c++  java
  • SpringBoot启动过程之web,servlet/filter等

    最近调试springboot的启动过程.看各种事件.

    ServletWebServerApplicationContext.onRefresh
    -->createWebServer()
    -->this.webServer = factory.getWebServer(getSelfInitializer());
    -->getSelfInitializer()
    -->selfInitialize
    
    ServletWebServerApplicationContext.selfInitialize
    -->ServletWebServerApplicationContext.getServletContextInitializerBeans
    -->ServletContextInitializerBeans.ServletContextInitializerBeans()
    -->ServletContextInitializerBeans.addServletContextInitializerBeans
    -->ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializer)
    -->beanFactory.getBeanNamesForType(type-->ServletContextInitializer) 
    这个返回各种filter的名字.就是filter加载位置
    //////////////////////////////////////////////////////////////////////
    // 这一段, md, 谁能看懂.
    boolean matchFound = (allowEagerInit || !isFactoryBean || (dbd != null && !mbd.isLazyInit()) || containsSingleton(beanName)) && (includeNonSingletons || (dbd != null ? mbd.isSingleton() : isSingleton(beanName))) && isTypeMatch(beanName, type); if (!matchFound && isFactoryBean) { // In case of FactoryBean, try to match FactoryBean instance itself next. beanName = FACTORY_BEAN_PREFIX + beanName; matchFound = (includeNonSingletons || mbd.isSingleton()) && isTypeMatch(beanName, type); } if (matchFound) { result.add(beanName); }

    看不出有啥特征, servlet之类的.

  • 相关阅读:
    命令实现linux和客户端文件上传下载
    python--linux上如何执行shell命令
    Eureka系列(一)Eureka功能介绍
    Eureka系列(七) 服务下线Server端具体实现
    编译时多态 与 运行时多态
    静态绑定(前期绑定) 与 动态绑定(后期绑定)
    重载 与 重写
    热点检测、方法内联、动态反优化
    数据库日志
    单例模式
  • 原文地址:https://www.cnblogs.com/tekikesyo/p/13490100.html
Copyright © 2011-2022 走看看