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)
相关推荐
卷到起飞的数分33 分钟前
JVM探究
java·服务器·jvm
Geek攻城猫34 分钟前
Java生产环境问题排查实战指南
java·jvm
蜡台35 分钟前
Ubuntu 24.04 系统版本 安装 MySQL 8 及相关配置
mysql·ubuntu·adb
OtIo TALL2 小时前
如何在 Ubuntu 22.04 上安装 MySQL
linux·mysql·ubuntu
OtIo TALL8 小时前
redis7 for windows的安装教程
java
不瘦80斤不改名8 小时前
深入浅出 MySQL(一):一文理清 SQL 核心规范与五大分类
数据库·sql·mysql
woniu_buhui_fei8 小时前
MySQL知识整理二
数据库·mysql
uNke DEPH9 小时前
Spring Boot的项目结构
java·spring boot·后端
xixingzhe29 小时前
idea启动vue项目
java·vue.js·intellij-idea
wzl202612139 小时前
企业微信定时群发技术实现与实操指南(原生接口+工具落地)
java·运维·前端·企业微信