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)
相关推荐
01_ice37 分钟前
MySQL库和表的操作
数据库·mysql
Lam Tang2 小时前
APS 系列文章 08
java·代理模式
萧瑟余晖2 小时前
Java深入解析篇三十三之消息队列
java·开发语言
码匠许师傅2 小时前
【C++ 面试真题】聊聊 C++ 的序列容器
java·c++·面试
这个DBA有点耶2 小时前
从库延迟的“二次放大”效应:一次大事务,拖垮整个读写分离
数据库·mysql·架构
IT爱学堂3 小时前
尚硅谷Java+AI大模型应用开发革新版本 2025年3月
java·开发语言·人工智能
一个有温度的技术博主3 小时前
MySQL 三大日志协同机制:redo log、undo log 与 binlog 的联合运作
数据库·mysql·oracle
不爱编程的小九九3 小时前
小九源码-springboot004-springboot智能阅读推荐系统
java·spring boot·后端
SCandL1524 小时前
Docker的实战应用
java·docker·容器
lf13210274 小时前
用 JSON Schema 管装修节点记录:从照片台账到可校验工程数据
网络·数据库·人工智能·经验分享·物联网·json·智能家居