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)
相关推荐
小师兄吃牛肉10 小时前
C语言指针进阶全解析
java·c语言·算法
Joy T10 小时前
聊天系统中五大ID的演进与实战解析
java·前端·人工智能·spring·agent入门
JAVA面经实录91710 小时前
线上故障标准处理流程【完整版|面试背诵+生产落地】
java·面试·职场和发展
殷色玫瑰11 小时前
C++入门基础复习:从命名空间到引用与nullptr,一篇重新捡回C++基础
java·开发语言·c++
做运维的阿瑞11 小时前
多表查询基础:INNER JOIN、LEFT JOIN、RIGHT JOIN
数据库·sql·mysql·算法
大侠归来12 小时前
C语言素数判断:从入门到进阶
java·c语言·算法
谢亮_vipxieliang12 小时前
Spring Boot 自动配置原理:从 @SpringBootApplication 到自定义 Starter
java·spring boot·后端
朝朝辞暮i12 小时前
C++ 第 25 课:getter / setter + this
java·javascript·c++
蜗牛互联网12 小时前
Python接入Gemini 3.8 Flash实现票据视觉抽取与规则校验
java·javascript·网络·人工智能·python
用户0942485680312 小时前
第22章:JIT编译分层——Interpreter、C1、C2与热点探测
java·jvm