`
huxiaoheihei
  • 浏览: 173127 次
  • 性别: Icon_minigender_2
  • 来自: 吉林
社区版块
存档分类
最新评论

Error configuring application listener of class org.springframework.web.….

阅读更多

今天在进行spring3.1配置的时候,

遇到了Error configuring application listener of class org.springframework.web.context.ContextLoaderListener的错误 ,

按照网上的方法试了好多种,

最后发现是无法找到applicationContext.xml文件造成的。

解决办法:
        首先,必须保证所有必须的jar包都已导入到/WEB-INF/lib文件夹中。
        其次,在web.xml中加入
        <context-param>
              <param-name>contextConfigLocation</param-name>
              <param-value>/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml</param-value>
        </context-param>
        <listener>
              <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>

一定要注意<param-value>……</param-value>中内容,如果不对的话,是找不到applicationContext.xml文件滴~~~
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics