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)
相关推荐
idolao21 小时前
MySQL 5.7 安装教程:详细步骤+自定义安装+命令行客户端配置(Windows版)
数据库·windows·mysql
daidaidaiyu1 天前
JMS, ActiveMQ 学习一则
java
20年编程老鸟java+ai全栈1 天前
mysql、pg、oracel数据库迁移避坑指南
数据库·mysql
weixin_704266051 天前
SpringBoot全注解开发指南
java·spring boot·mybatis
星如雨グッ!(๑•̀ㅂ•́)و✧1 天前
Webflux fromXXX对比
java
西柚0011 天前
Ubuntu22.04.5 + Docker + MySQL 5.7
mysql·docker·容器
competes1 天前
学生需求 交易累计积分,积分兑换奖品
java·大数据·开发语言·人工智能·java-ee
小羊子说1 天前
Android系统中 socketpair 的源码解读与应用分析小结
android·java
splage1 天前
Java进阶——IO 流
java·开发语言·python
Yvonne爱编码1 天前
数据库---Day 1 数据库基础
数据库·mysql·oracle