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)
相关推荐
汝生淮南吾在北2 小时前
SpringBoot+Vue饭店点餐管理系统
java·vue.js·spring boot·毕业设计·毕设
tzhou644525 小时前
MySQL备份与恢复
数据库·mysql·adb
冬夜戏雪5 小时前
【java学习日记】【2025.12.7】【7/60】
java·开发语言·学习
CC.GG5 小时前
【C++】二叉搜索树
java·c++·redis
一过菜只因5 小时前
MySql Jdbc
android·数据库·mysql
思成不止于此6 小时前
MySQL 查询实战(三):排序与综合练习
数据库·笔记·学习·mysql
tebukaopu1486 小时前
mysql数据备份还原
数据库·mysql
zyxqyy&∞6 小时前
mysql代码小练-2
数据库·mysql
JIngJaneIL7 小时前
基于Java非遗传承文化管理系统(源码+数据库+文档)
java·开发语言·数据库·vue.js·spring boot
poemyang7 小时前
像Git一样管理数据:深入解析数据库并发控制MVCC的实现
mysql·事务·mvcc