博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
错误:找不到类org.springframework.web.context.ContextLoaderListener
阅读量:7062 次
发布时间:2019-06-28

本文共 765 字,大约阅读时间需要 2 分钟。

 

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

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

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

Java虚拟机是根据Java ClassLoader(类加载器)决定如何加载Class。 

系统默认提供了3个ClassLoader 
Root 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

 

转载地址:http://gfnll.baihongyu.com/

你可能感兴趣的文章
js 事件详解 冒泡
查看>>
TransE论文剩余部分
查看>>
nodejs小问题拾遗
查看>>
数据结构与算法 - 字符串
查看>>
个人资源索引
查看>>
docker-dockerfile使用
查看>>
HW2017笔试编程题
查看>>
关于集合的size的操作
查看>>
对称加密算法 非对称加密算法
查看>>
SpringBoot Druid整合,SpringBoot 集成Druid
查看>>
Reddit CEO亲自诠释内容审核的无奈
查看>>
java性能优化读书笔记(1)
查看>>
【转】nGrinder 简易使用教程
查看>>
Java中char转为16进制
查看>>
Linux下逻辑地址、线性地址、物理地址详细总结
查看>>
go 类型转换
查看>>
Linux常用基本命令:三剑客命令之-awk数组用法
查看>>
Ubuntu x86-64汇编(5) 控制指令
查看>>
curl如何发送json数据?如何发送form数据?python的restfull又该如何获取这些数据?...
查看>>
如何生成16位流水号
查看>>