|
在多个人做同一个项目的时候肯定需要使用多个struts_config.xml文件和多个applicationContext.xml文件。那么怎么配置这些文件呢? 首先配置多个struts_congfig.xml文件。。 在web.xml中写下面的代码: <init-param> 这样多个struts_config.xml的配置文件就完了。。 继续配置多个applicationContext.xml文件。这个是在struts_config.xml文件下完成的: <plug-in 这样就配置完了。 有的人配置多个applicationContext.xml文件也在XML下配置。配置代码如下: <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:/applicationContext*.xml</param-value> </context-param> (这种方式的配置是所有applicationContext.xml文件都在classes下)。 |
使用import简化spring的配置文件
最新推荐文章于 2024-08-31 18:00:00 发布
本文介绍如何在一个项目中配置多个struts_config.xml和applicationContext.xml文件。通过在web.xml和struts_config.xml中指定配置文件路径,实现灵活的模块化管理。
1005

被折叠的 条评论
为什么被折叠?



