读书人

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

发布时间: 2012-10-09 10:21:45 作者: rapoo

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所有的内容,否则会出错!

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

?

读书人网 >Web前端

热点推荐