Java后端使用POST请求向mysql中插入Json数据的问题

1.后端请求正常 但数据表中value没有值

bash 复制代码
原因 json数据属性不符合spring解析格式,json属性名称的大写字母不符合spring要求
以下为为错误示范 
1 Test 以大写字母开头,
2 tTest 小写字母开头,但是第二个字母是大写

解决方案 实体类属性加上@JsonPropert

2.Type handler was null on parameter mapping for property 'data'. It was either not specified and/or could not be found for the javaType (java.util.List) : jdbcType (null) combination.] with root cause

Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for

property 'urlParams'. It was either not specified and/or could not be found for the javaType

(com.alibaba.fastjson.JSONObject) : jdbcType (null) combination.

bash 复制代码
在实体列表属性加上以下注解
@TableField(typeHandler = JacksonTypeHandler.class)
判定json 以排除其为null的可能性

3.mp不能直接读取json

bash 复制代码
在实体加上@TableName(autoResultMap = true)
相关推荐
码农颜12 小时前
5.4.1 锁分类
java·数据库·mysql
云深处@13 小时前
【数据库】MySQL 入门
数据库·学习·mysql
梦远星帆13 小时前
SQLyog社区版下载
数据库·mysql·sqlyog
linux-hzh13 小时前
百日算法修炼 · Day 03
java·算法
不负岁月无痕14 小时前
简单理解操作系统结构
java·linux·c语言·开发语言·c++·面试
mister_guo14 小时前
Java线程池参数应该如何设置(ThreadPoolExecutor)
java
余额瞒着我当琳14 小时前
C++模板初阶与STL初探
android·java·c++
淡海水14 小时前
15-02-YooAsset面试篇-Unity架构设计与源码
java·unity·面试·c#·游戏引擎·yooasset
qq_4480111615 小时前
C语言中的指针函数和函数指针
java·c语言·开发语言
weixin_BYSJ198715 小时前
springboot酒店管理系统--附源码27436
java·spring boot·python·随机森林·贪心算法·eclipse·django