上篇介绍了Spring IOC的核心功能,都在refresh()方法里。那么这个方法是从哪发起调用的呢?

web.xml

看如下配置:

  <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath*:config/spring/appcontext-*.xml
        </param-value>
    </context-param>
 
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
ContextLoaderListener,就是最初的入口。
题外:contextConfigLocation是spring的配置文件存放路径。


参考:https://blog.csdn.net/v123411739/article/details/86555733

 

相关文章:

  • 2022-12-23
  • 2021-10-18
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2021-06-11
  • 2021-08-20
  • 2021-12-31
猜你喜欢
  • 2022-02-01
  • 2022-12-23
  • 2022-12-23
  • 2021-08-25
  • 2021-11-27
  • 2021-11-09
  • 2022-02-01
相关资源
相似解决方案