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)
相关推荐
Tim_1013 分钟前
【C++】009、extern关键字
java·开发语言
ShiXZ21315 分钟前
PDF-OCR文件识别篇(七):数据入库
java·pdf·json·ocr·springboot
rebibabo1 小时前
Java基础(番外) | Kafka 入门:分区、副本与消费者组原理
java·分布式·kafka·学习笔记·副本·分区·异步日志
Flittly1 小时前
【AgentScope Java新手村系列】(17)长期记忆系统
java·spring boot·spring
wei1986211 小时前
.net添加web引用和添加服务引用有什么区别?
java·前端·.net
Full Stack Developme1 小时前
正则表达式的使用教程
java·数据库·正则表达式
KASH_SHADOW1 小时前
8-Mysql的安装与配置
数据库·mysql·adb
SeeYa-J2 小时前
Sprint 1-2:创建第一个 Spring Boot Module(user-service)
java·spring boot·sprint
云絮.2 小时前
数据库事务
java·开发语言·数据库