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)
相关推荐
CRMEB系统商城1 小时前
开源自建还是SaaS订阅?算一笔3年经济账
java·大数据·开发语言·开源
王琦03181 小时前
生产环境中使用通用二进制包安装
mysql
keyipatience2 小时前
线程栈与TLS和线程互斥
java·linux·服务器·开发语言·ubuntu
weixin_408099672 小时前
2026 图片去水印 API 接口完全指南:一键去除图片水印(附 Python/Java/PHP/C# 示例)
java·python·php·图片处理·api调用·图片去水印·石榴智能
钱六两3 小时前
#3、SpringAI 接入deepSeek大模型(喂饭版)
java·spring boot·ai编程
null_174 小时前
IntelliJ IDEA 极致流畅配置方案:Ultra 9 285K + 64GB 内存实测
java·ide·intellij-idea
Herbert_hwt4 小时前
建立Java程序开发
java·开发语言
蓝田~4 小时前
MySQL慢查询怎么优化?B+Tree索引原理+MVCC读不阻塞写+EXPLAIN执行计划,从5秒到0.05秒
数据库·mysql
Herbert_hwt4 小时前
MySQL学习前言:关于MySQL的历史与当下学习的必要性
mysql
好好沉淀4 小时前
@ExcelIgnoreUnannotated 和 @AutoMapper 详解
java