博客
关于我
分享一个500异常
阅读量:338 次
发布时间: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/

你可能感兴趣的文章
FANUC机器人的镜像备份操作及U盘格式化具体步骤
查看>>
vue-依赖-点击复制
查看>>
vue如何配置兼容ie es6转es5
查看>>
node-npm的简绍与使用
查看>>
js井子棋
查看>>
vue项目如何区分开发、生产和测试环境
查看>>
css取消双击选中文字
查看>>
LeetCode 116填充每个节点的下一个右侧结点指针
查看>>
C++小笔记——function绑定重载函数、私有继承用的条件
查看>>
最近一些算法题的总结
查看>>
2021-4-28【PTA】【L2-1 包装机 (25 分)】
查看>>
2021-5-2【指针】【作业】【指针代替下标进行数组编程】
查看>>
Arduino mega2560+MPU6050利用加速度值控制舵机
查看>>
MPU9250九轴姿态解算开发小结
查看>>
pycharm+python+MS SQLSERVER 实战2、实现爬虫程序。
查看>>
判断字符是否出现
查看>>
C 语言restrict 关键字的使用浅谈
查看>>
深入理解数组指针与指针数组的区别
查看>>
VisualStduio2019 C++如何重定向(用文件输入输出)
查看>>
iOS客户端与PHP服务端的简单交互
查看>>