手动写一个监听器加载applicationContext.xml配置文件 1.创建一个普通的类 并且实现ServletContextListener,重写方法。 2.在初始化方法中创建配置文件对象,并且存到ServletContext域中 3.在web.xml中配置该Listener 配置监听器 配置全局参数applicationContext.xml 4.使用工具类解除耦合 创建工具类