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)
相关推荐
虚行16 小时前
Mysql 数据同步中间件 对比
数据库·mysql·中间件
奥尔特星云大使16 小时前
mysql读写分离中间件Atlas安装部署及使用
数据库·mysql·中间件·读写分离·atlas
tuine16 小时前
SpringBoot使用LocalDate接收参数解析问题
java·spring boot·后端
牛马baby17 小时前
【mysql】in 用到索引了吗?
数据库·mysql·in
-Xie-17 小时前
Mysql杂志(三十)——索引失效情况
数据库·mysql
冼紫菜17 小时前
[特殊字符] 深入理解 PageHelper 分页原理:从 startPage 到 SQL 改写全过程
java·后端·sql·mysql·spring
为java加瓦17 小时前
Lombok @Data 注解在 Spring Boot 项目中的深度应用与实践指南
java·开发语言·数据库
青山撞入怀111417 小时前
sql题目练习-子查询
java·数据库·sql
程序新视界17 小时前
什么是MySQL分区?
数据库·mysql·dba
程序新视界17 小时前
实战技巧:使用冗余查询条件解锁MySQL中的索引
数据库·mysql·dba