ZFYCH_Love

Simply but Powerful

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

 

上篇介绍了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

 

posted on 2021-04-21 20:44  xiaoyang_  阅读(73)  评论(0编辑  收藏  举报