SpringBoot 报错锦集
1、文件上传时,报“415 unsupported type”。
解决:使用@ModelAttribute
而不是@RequestBody。
测试:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"><head><title>Hello World!</title><meta charset="utf-8">
</head><body><form method="POST" enctype="multipart/form-data" action="http://127.0.0.1:8888/upload"><p>文件1:<input type="text" name="id" /></p><p>文件2:<input type="text" name="name" /></p><p>文件3:<input type="file" name="file" /></p><p><input type="submit" value="上传" /></p></form>
</body></html>
@RequestMapping(value = "/upload", method = RequestMethod.POST)public String upload(@ModelAttribute FileUpload fileUpload) {return "ok";}
2、Failed to deserialize payload. Is the byte array a result of反序列化错误。
解决:清空redis缓存。
1、redis安装目录下输入cmd 2、redis-cli -p 端口号3、flushdb 清除当前数据库缓存4、flushall 清除整个redis所有缓存
3、下载文件报错org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
解决:函数返回改为void,或者使用函数@Controller。
4、位置属性 FlowableException: Unknown property used in expression
解决:记得加getter方法呀。
SpringBoot 报错锦集相关推荐
- 报错锦集二“nginx: [emerg] unknown directive “set_real_ip_from“ in /usr/local/nginx/conf/nginx.conf:50 ngi
报错锦集二"nginx: [emerg] unknown directive "set_real_ip_from" in /usr/local/nginx/conf/ng ...
- mysql主从报错_Mysql主从报错锦集
前言 在发生故障切换后,经常遇到的问题就是同步报错,下面是最近收集的报错信息. 记录删除失败 在master上删除一条记录,而slave上找不到 Last_SQL_Error: Could not e ...
- 【Hadoop】 | 搭建HA之报错锦集
知识目录 一.写在前面✨ 二.Hadoop的active结点无法主备切换
- SpringBoot报错:Could not autowire. No beans of ‘DiscussantMapper‘ type found
SpringBoot报错:Could not autowire. No beans of 'DiscussantMapper' type found 一.资源 @Mapper和@Repository注 ...
- 启动springboot报错Error creating bean with name 'dataSource' defined in class path resource
2019独角兽企业重金招聘Python工程师标准>>> 启动springboot报错Error creating bean with name 'dataSource' define ...
- 【杂文】spring-boot报错 ~ zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognized or represents more than on time zone.
spring-boot报错 zone value 'Öйú±ê׼ʱ¼ä' is unrecognized 修改MySQL的配置文件(failed) 更改MySQL中的系统时间(failed) 修 ...
- springboot报错!!!
点击运行springboot,再在浏览器访问路径的时候,报错!!! 运行结果出来了,但是再结束的时候报错. springboot报错java.lang.NoSuchMethodError: javax ...
- 【Debugger】解决springboot报错Failed to resolve org.junit.platform:junit-platform-launcher:1.x.x的两种解决方案
[Debugger]解决springboot报错Failed to resolve org.junit.platform:junit-platform-launcher:1.x.x的两种解决方案 主要 ...
- springboot报错:class path resource cannot be opened because it does not exits
问题描述:springboot报错:在使用@PropertySource注解读取properties文件时,报错:class path resource cannot be opened becaus ...
最新文章
- python Day5
- 中国阻燃纤维板市场运行局势分析与产销需求前景展望报告2022年
- 线性拟合和梯度下降python代码实现—面向对象(二)
- Cornfox Bros.如何将手游移植到Switch
- C语言高级编程:sizeof计算数组大小需要注意的问题
- Java IO: 字节和字符数组
- @程序员,为你揭开直播技术的神秘面纱!
- KM算法--带权二分匹配
- 世界时间与伦敦时间_伦敦政治经济学院LSE 2021申请时间线来了,提交申请
- 单片机IC卡读取开题报告_基于单片机实现IC卡读卡器
- 分治法 --- 大整数的乘法
- chrome设置socket5代理
- 1分钟链圈 | 凤凰网推出区块链产品“凤凰蛋”;阿里否认涉足区块链和发币,称麻吉宝已下线;Google朱会灿,AI回归
- 这个神器让我的 Bug 少了一半
- html怎么把图片做成抖动效果,CSS图片抖动和JS点击特效
- [MATLAB App Designer] 多窗口 App 中的交互(含数据传递)
- 自己搭建的网站,浏览器无法访问此页面解决方法
- Processing 模拟池塘生态系统
- HTML、CSS定义字体、颜色、背景等属性
- 哗哗地照样子写词语_哗哗照样子写词语,