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)
相关推荐
好好研究5 分钟前
SpringMVC框架 - 异常处理
java·开发语言·spring·mvc
只会写代码6 分钟前
JDK8 Lambda 加持:打造优雅通用的对象构建器
java
h***936613 分钟前
【MySQL数据库】Ubuntu下的mysql
数据库·mysql·ubuntu
摇滚侠21 分钟前
Vue 项目实战《尚医通》,完成确定挂号业务,笔记46
java·开发语言·javascript·vue.js·笔记
正在走向自律28 分钟前
豆包编程模型Doubao-Seed-Code深度体验,从零开始构建全栈项目的完整指南
java·服务器·数据库·doubao·claude code·火山方舟
h***85629 分钟前
MySQL数据分析
数据库·mysql
钱多多_qdd32 分钟前
基础篇:IoC(九):应用上下文ApplicationContext
java·spring
q***55891 小时前
SpringSecurity 实现token 认证
java
合作小小程序员小小店1 小时前
web网页开发,在线%医院诊断管理%系统,基于Idea,html,css,jQuery,java,jsp,ssh,mysql。
java·前端·css·数据库·jdk·html·intellij-idea
Mr.徐大人ゞ1 小时前
8.事务在 Group Replication 中的处理流程
mysql