如何解决重复加载Spring配置文件

菜鸟有一问题请教:
任务描述:我采用struts1.2+hibernate3.0+spring2.0搭建框架,开发项目。在使用dwr技术实现检查机构名是否存在功能。功
能实现在业务层,由于要调用数据层的方法,我使用spring的依赖注入方式,将数据层实现类注入到数据层的接口对象。
问题描述:在web.xml中配置dwr方式一:

dwr

org.directwebremoting.servlet.DwrServlet


debug
true



dwr
/dwr/*

这样配置,无法实现注入,数据层接口对象为null;

     在web.xml中配置dwr方式二:
       在以上配置上加入以下:
       <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
    <listener-class>
        org.springframework.web.context.ContextLoaderListener
    </listener-class>
</listener>
     这种方式spring配置文件会重复加载,因为在strut配置文件中添加对spring的支持是采用插件方式。

我的问题:怎样解决重复加载spring配置文件?

去掉struts里面的插件方式,
一般都是采用web.xml里面来配置,这样灵活一些

两种方式,只保留一种就好了,
要不就用struts里面的插件方式,要不就用web.xml里面

org.springframework.web.context.ContextLoaderListener