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)
相关推荐
摇滚侠21 分钟前
SpringMVC 入门到实战 文件上传 75-77
java·后端·spring·maven·intellij-idea
程序猿乐锅25 分钟前
【MySQL | 第八篇】MySQL 视图
数据库·mysql
GIS数据转换器29 分钟前
城市排水生命线安全运行监测平台深度解析
java·运维·人工智能·python·安全·数据挖掘·无人机
华如锦1 小时前
面了很多 Java转AI Agent方向,一些面试题总结
java·开发语言·人工智能·python·ai
睡不醒男孩0308231 小时前
CLup 6.x 版本中针对StarRocks 存算一体集群的完整操作手册
java·服务器·网络·clup
程序员黑豆2 小时前
Java中怎么实现字符串拼接呢【AI全栈开发】
java
java1234_小锋3 小时前
LangChain4j 开发Java Agent智能体- 多模态支持
java·开发语言·langchain4j
艳阳天_.3 小时前
星瀚弹框页面实现
java·前端·python
小熊美家熊猫系统3 小时前
电子合同技术实现与合规实践
java·开发语言·分布式