可以的,偶的上个项目就是分模块配置spring文件,这样非常便于维护.(偶的项目架构是struts+spring+hibernate)
具体配置如下:
有三模块:A,B,C分别对应三个spring文件spring-a.xml,spring-b.xml,spring-c.xml还有数据源的applicationContext.xml文件.
其中applicationContext.xml在web.xml中配置:
<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
      /WEB-INF/applicationContext.xml,
    </param-value>
  </context-param>
spring-a.xml,spring-b.xml,spring-c.xml在struts-config.xml中配置:
 <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
    <set-property property="contextConfigLocation"
         value="spring-a.xml,
                spring-b.xml,
                spring-c.xml "
    />
  </plug-in>