首页 > 学院 > 开发设计 > 正文

错误:找不到类org.springframework.web.context.ContextLoaderListener

2019-11-14 23:43:12
字体:
来源:转载
供稿:网友
错误:找不到类org.sPRingframework.web.context.ContextLoaderListener

严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListenerjava.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

错误:找不到类org.springframework.web.context.ContextLoaderListener

Java虚拟机是根据Java ClassLoader(类加载器)决定如何加载Class。系统默认提供了3个ClassLoaderRoot ClassLoader,ClassPath Loader,Ext ClassLoader我们也可以编写自己的ClassLoader,去加载特定环境下的Jar文件。能不能加载Jar,加载哪里的Jar,是由ClassLoader决定的。

问题: 导入的仅仅是jar包的引用,例如在eclipse中通过build path加进user lib……(类似快捷方式)这种在Java Application中没问题,但在web Application中可能会出现找不到类的异常。在WEB Application中jar包最好放在webroot或webcontent下的lib文件夹内,特别是xml中用到的jar包。

解决:1.jar包放在webroot或webcontent下的lib文件夹内

   2. 右击项目名称-Properties--Deployment Assembly--右边点击ADD-Java Build path entries --添加自定义的user-lib


上一篇:Eclipse功能集合

下一篇:SSH整合简述一

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表