首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

web.xml加载spring 时要注意的有关问题

2012-10-09 
web.xml加载spring 时要注意的问题? !-- spring配置-- listenerlistener-classorg.springframework.

web.xml加载spring 时要注意的问题

?

 <!-- spring配置  --> <listener>        <listener-class>             org.springframework.web.context.ContextLoaderListener         </listener-class>   </listener>      <context-param>       <param-name>contextConfigLocation</param-name>       <param-value>                 classpath:spring/applicationContext-index.xml,                classpath:spring/DWR-applicationContext.xml,                        classpath:applicationContext.xml?        </param-value>    </context-param>    <!-- spring配置  end-->
?


???

注意以上代码中的classpath:spring/applicationContext.xml,这个是在web.xml中最后一个加载的spring文件,这一项目的spring一定要是最全的,包含上面applicationContext.xml所有的内容,否则会出错!

今天发现这个问题,特意发表,如果我说的不对的话,请提出来!

?

热点排行