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)
相关推荐
我喜欢山,也喜欢海38 分钟前
Java和go在并发上的表现为什么不一样
java·python·golang
Wenzar_2 小时前
**零信任架构下的微服务权限控制:用Go实现基于JWT的动态访问策略**在现代云原生环境中,
java·python·微服务·云原生·架构
lUie INGA8 小时前
在2023idea中如何创建SpringBoot
java·spring boot·后端
极客on之路8 小时前
mysql explain type 各个字段解释
数据库·mysql
代码雕刻家8 小时前
MySQL与SQL Server的基本指令
数据库·mysql·sqlserver
lThE ANDE8 小时前
开启mysql的binlog日志
数据库·mysql
小糖学代码8 小时前
LLM系列:1.python入门:15.JSON 数据处理与操作
开发语言·python·json·aigc
geBR OTTE9 小时前
SpringBoot中整合ONLYOFFICE在线编辑
java·spring boot·后端
Porunarufu9 小时前
博客系统UI自动化测试报告
java
川石课堂软件测试10 小时前
软件测试:典型面试题库
数据库·python·功能测试·mysql·单元测试·grafana·prometheus