1. 程式人生 > >web.xml中配置contextConfigLocation引數作用

web.xml中配置contextConfigLocation引數作用

如果在web.xml裡給該Listener指定要載入的xml,如:

xml程式碼如下:

       contextConfigLocation  

       classpath:applicationContext.xml

則會去載入相應的xml,而不會去載入/WEB-INF/下的applicationContext.xml。

但是,如果沒有指定的話,預設會去/WEB-INF/下載入applicationContext.xml。

轉載來自: