通过 ServletContextEvent 获取spring的applicationContext文件所在的路径
?
<!-- 监听时读取,Spring配置文件目录 --><context-param><param-name>applicationContextConfigName</param-name><param-value>WEB-INF/applicationContext.xml</param-value></context-param>