
常见异常解决
记录难处理、或者难发现的异常
砥砺前行冲冲冲
这个作者很懒,什么都没留下…
展开
-
【解决】在springboot中使用了jsp文件后访问地址后自动下载jsp文件
在springboot中使用了jsp文件后访问地址后自动下载jsp文件原创 2022-07-12 15:30:04 · 868 阅读 · 0 评论 -
数据接受异常:org.springframework.http.converter. HttpMessageNotReadableException: Could not read document
org.springframework.http.converter.HttpMessageNotReadableException: Could not read document: Unrecognized field “inputType”后端用@RequestBody注解接收Json实体类,但前端传来的Json中有实体类没有的字段“inputType”后端在实体类上添加注解@JsonIgnoreProperties(ignoreUnknown = true)忽略前端所传来的无效字段...原创 2022-06-10 15:30:47 · 1243 阅读 · 0 评论 -
No transaction aspect-managed TransactionStatus in scope
翻译:范围内没有事务方面管理的TransactionStatus1. 原因web项目中没有启动Spring transaction事务管理,但是我们却用了“TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();”这样的手动事务回滚,在Spring事务没有起作用的情况下,就会报“No transaction aspect-managed TransactionStatus in scope”异常,如下是我们经常出现这.转载 2022-05-27 10:28:15 · 8288 阅读 · 0 评论 -
【解决】数据库查询出时间,传给前端变为时间戳
常用:在实体类属性上添加@JsonFormat注解@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")private Date createtime;原创 2022-05-16 16:44:18 · 1254 阅读 · 2 评论 -
解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
一、异常描述org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxx.mapper.xxxtMapper.selectDetailList可以看出是mybatis的映射绑定异常,通常有两种可能的原因:(1)xxxMapper对应的xml文件找不到(2)xml文件中找不到对应的方法二、排查1、“xml文件找不到”(1)xxxMapper接口名必须和xml文件名相同(2)xml原创 2022-05-09 19:04:34 · 616 阅读 · 0 评论