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 分钟前
【若依项目-产品经理视角】深度拆解 RuoYi-Vue-Pro 认证与权限:RBAC + 数据权限,这套“门禁系统“到底怎么设计的?
java·vue.js·人工智能·产品经理·ai编程
Summer-Bright18 分钟前
深度 | Agent 协议标准化:一场决定了 AI 经济底层规则的基础设施战争
java·数据库·人工智能·ai
我叫张小白。26 分钟前
LangChain 结构化输出(Structured Output)技术文档
java·数据库·langchain
灯澜忆梦31 分钟前
Go 语言 _JSON---序列化与反序列化
开发语言·golang·json
猫猫不是喵喵.1 小时前
双亲委派机制与类加载过程
java·开发语言
大模型码小白1 小时前
向量化引擎与 AI 排障:当 SIMD 遇到异常检测,存储诊断的范式转移
java·大数据·数据库·人工智能·python
程序员清风1 小时前
公司要裁员之前,都会有哪些信号?
java·后端·面试
Flittly2 小时前
【AgentScope Java新手村系列】(20)文字转语音TTS
java·spring boot·spring
唠点键盘之外的2 小时前
10 Spring Boot + 大模型:Java 项目接入 AI 的三种姿势
java·spring boot·aigc·cursor
NWU_LK2 小时前
【WebFlux】第五篇 —— 两种编程模型与 WebClient
java