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)
相关推荐
金銀銅鐵2 小时前
类实例里还有什么——putfield、getfield 与对象传递
java·jvm·后端
默 语2 小时前
HarmonyOS7 事件分发控制(二):onTouchIntercept 镂空玻璃卡——圆内自己接,圆外放行
android·java·开发语言
zxcvb1533 小时前
运维实践里把备份mysql数据库做稳的一些思路
运维·数据库·mysql
sharemylove4 小时前
Java 异常与常用类 学习笔记
java·开发语言·经验分享·笔记·学习
炸薯条!5 小时前
Python基础学习:文件操作详解(打开、读取、写入与路径)
java·服务器·python
Dreams_l6 小时前
基于SpringBoot实现的抽奖系统(四)
java·spring boot·后端
一级新生6 小时前
Dify 迭代节点:从输入输出到九步实操
数据库·人工智能·mysql·低代码·工作流·dify
这个昵称不容易6 小时前
SpringBoot 网上订餐系统设计与实现:80 个 Java 文件、91 个接口,附真实运行截图
java·springboot·毕设
Helix2506 小时前
JDK异常处理最佳实践:受检异常、非受检异常、try-catch-finally与全局异常处理完整指南
java·开发语言·jdk·异常处理·全局异常·自定义异常·try-catch
唐青枫7 小时前
MySQL mysql.help_topic 详解及实战 Demo
mysql