• 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之类的.

  • 相关阅读:
    binder机制理解
    Android 资源目录
    Andriod 构建项目流程
    dpi、ppi 、dp、sp、px、 pt相关概念
    短语、直接短语和句柄
    MySql优化
    java虚拟机内存管理
    redis
    linux——nginx的安装及配置
    linux——高级文本处理命令之wc、cut、sort
  • 原文地址:https://www.cnblogs.com/tekikesyo/p/13490100.html
Copyright © 2020-2023  润新知