
分享一个500异常
发布日期:2021-05-07 13:38:17
浏览次数:11
分类:原创文章
本文共 1482 字,大约阅读时间需要 4 分钟。
这是个spring相关的项目,很显然错误信息中没有什么有效的信息。报错500说明服务端那边有问题,于是博主在服务端打了个断点,单步执行,发现程序都没进入断点!
最后
我修改了一下applicationContext.xml的头部信息
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
那个schemaLocation中的信息很容易被遗漏!
对比原来的xml
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/cache" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
发现原来是mvc:annotation-driver的schemaLocation导入错误。
发表评论
最新留言
感谢大佬
[***.8.128.20]2025年04月04日 23时09分10秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
权限修饰符protected和default的区别
2019-03-04
紫书——蛇形填数
2019-03-04
吐泡泡(栈)
2019-03-04
刷题计划1——poj1753
2019-03-04
Specialized Four-Digit Numbers——进制转换
2019-03-04
第一场
2019-03-04
蓝桥杯备战——刷题(2019)
2019-03-04
kuangbin题单 进阶搜素 深度优先搜索 哈密顿绕行世界问题 HDU2181
2019-03-04
谷歌最新提出无需卷积、注意力 ,纯MLP构成的视觉架构
2019-03-04
ArcMap|栅格计算器报错
2019-03-04
批量把多个csv/txt合成一个csv/txt
2019-03-04
《小石潭记》古文鉴赏
2019-03-04
Matlab中有关字符串数组的常见问题解答
2019-03-04
未定义的变量“py”或函数“py.command”
2019-03-04
我们,都一样......(句句入心)
2019-03-04
两个数求最大公约数和最小公倍数的方法和理解
2019-03-04
总结了一下c/c++函数和变量的命名规则
2019-03-04
关于构造函数内调用虚函数的问题
2019-03-04
【SSL_2291】分组背包
2019-03-04
最短路径问题—Dijkstra算法
2019-03-04