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)
相关推荐
不会代码的小猴35 分钟前
7. JSON
开发语言·c++·笔记·qt·算法·json
用户37215742613536 分钟前
如何使用 Java 在 Word 文档中添加和删除水印:分步指南
java
王中阳Go2 小时前
老板用AI三天写到90%,让我明天上线:Java 团队怎么接这10%的烂摊子?
java
gugucoding2 小时前
55. 【Java】Maven:项目构建的“管家”
java·maven
冰之杍3 小时前
MySQL utf8mb3 → utf8mb4 完整修改方案
数据库·mysql
郑州光合科技余经理3 小时前
海外版多语言团购系统架构:主数据互通与核销边界
java·开发语言·前端·后端·系统架构·php·ai编程
这个DBA有点耶3 小时前
一文讲透数据库分类:关系型、非关系型、OLTP、OLAP、分布式、多模……
数据库·mysql·架构
Jesse_EC4 小时前
为什么我设置的 contentLength 到了消费端变成了 0?
java
vipxieliang4 小时前
ValidX 的 Date 和 DateTime vs JPA 的 Temporal 对比
java·后端