博客
关于我
分享一个500异常
阅读量:339 次
发布时间:2019-03-04

本文共 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导入错误。

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

你可能感兴趣的文章
「NOI2015」程序自动分析 并查集题解
查看>>
[JSOI2008]Blue Mary的战役地图 Hash题解
查看>>
Ubuntu修改终端上显示的用户名和主机名(详细步骤)
查看>>
教你写一手漂亮的伪代码(详细规则&简单实例)
查看>>
MySQL的基本体系和架构介绍
查看>>
MySQL数据备份实践和整理
查看>>
结构型设计在工作中的一些经验总结
查看>>
如何提升员工体验 助力企业业务增长?这个棘手的问题终于被解决了!
查看>>
腾讯物联网操作系统正式开源,最小体积仅1.8 KB
查看>>
不懂数据库的码农不是好程序员!
查看>>
全球首个!阿里云开源批流一体机器学习平台Alink……
查看>>
必须要看的网上冲浪安全攻略!
查看>>
红点中国、红杉中国联合领投,WakeData惟客数据完成1000万美元B轮融资
查看>>
看完这篇操作系统,和面试官扯皮就没问题了!
查看>>
OpenStack发布Ussuri版本 实现智能开源基础设施的自动化
查看>>
整理了一份 Docker系统知识,从安装到熟练操作看这篇就够了 | 原力计划
查看>>
2020 AI 产业图谱启动,勾勒中国 AI 技术与行业生态
查看>>
“编程能力差,90%输在了数学上!”CTO:多数程序员都是瞎努力!
查看>>
霍因科技获首届全国信创产业生态创新奖
查看>>
我是程序员,我用这种方式铭记历史
查看>>