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)
相关推荐
一只大袋鼠1 天前
MySQL 进阶:聚集函数、分组、约束、多表查询
开发语言·数据库·mysql
dllxhcjla1 天前
微服务全套
java
亚历克斯神1 天前
JVM 内存管理 2026:深度解析与调优实战
java·spring·微服务
逻辑驱动的ken1 天前
Java高频面试题:03
java·开发语言·面试·求职招聘·春招
广师大-Wzx1 天前
一篇文章看懂MySQL数据库(下)
java·开发语言·数据结构·数据库·windows·python·mysql
野生技术架构师1 天前
Java NIO到底是个什么东西?
java·开发语言·nio
DevOpenClub1 天前
文章抽取信息化 JSON API 接口
json
likerhood1 天前
简单工厂设计模式
java·ide·intellij-idea
爱学习的小邓同学1 天前
MySQL --- MySQL数据库基础
数据库·mysql
派大星酷1 天前
Java 调用 Kimi API 实战:实现与大模型的简单对话
java·开发语言·ai编程