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)
相关推荐
·云扬·14 分钟前
【MySQL】实战:用pt-table-sync修复主从数据一致性问题
数据库·mysql·ffmpeg
野生技术架构师29 分钟前
一线大厂Java面试八股文全栈通关手册(含源码级详解)
java·开发语言·面试
廋到被风吹走36 分钟前
【AI】Codex 多语言实测:Python/Java/JS/SQL 效果横评
java·人工智能·python
swIn KWAL1 小时前
【MySQL】环境变量配置
数据库·mysql·adb
shark22222221 小时前
【JOIN】关键字在MySql中的详细使用
数据库·mysql
RATi GORI1 小时前
MySQL中的CASE WHEN语句:用法、示例与解析
android·数据库·mysql
tERS ERTS1 小时前
MySQL中查看表结构
java
坊钰1 小时前
Java 死锁问题及其解决方案
java·开发语言·数据库
于先生吖1 小时前
SpringBoot+MQTT 无人健身房智能管控系统源码实战
java·spring boot·后端
仍然.2 小时前
算法题目---模拟
java·javascript·算法