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)
相关推荐
FungLeo10 小时前
FengCMS · PHP+MySQL 升级实录· 依赖生命周期与来源核验:jQuery 4.0 迁移 + SHA-256 核验脚本
mysql·php·jquery·依赖管理·fengcms
codeejun11 小时前
每日一Go·MySQL-22、幻读、不可重复读、脏读实战演示
开发语言·mysql·golang
云草桑11 小时前
C#入坑JAVA 潜规则 API Get 多参数 Spring Boot与Spring Cloud 区别 入门系列4
java·开发语言
FungLeo11 小时前
FengCMS · PHP+MySQL 升级实录 · CI 落地:PHP 8.4/8.5 矩阵、隔离凭证、诊断门槛失败
mysql·ci/cd·php·持续集成·fengcms
Escalating_xu11 小时前
【MySQL】视图特性:从创建与基表联动,到更新限制、权限与 SQL 实战
android·sql·mysql
头发还在的女程序员19 小时前
Java充电桩平台源码解析:枪口状态、上报时间与页面刷新怎样协同
java·开发语言·充电桩系统·充电桩管理·充电系统·充电小程序
Cosolar1 天前
从 Java 21 升到 25、Spring Boot 3 升 4:一次可复现的迁移踩坑实录
java·后端·面试
IT空门:门主1 天前
LangChain4j 1.24.0 深度解读:新特性、版本对比与学习路线
java·学习
hackhase1 天前
Django 多表数据整合:7 张异构表如何收敛成 4 类页面
后端·mysql
用户3721574261351 天前
Java 批量操作 Excel 超链接:添加、读取、修改和删除
java