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)
相关推荐
camellias_5 小时前
【无标题】
java·tomcat
咸鱼2.06 小时前
【java入门到放弃】需要背诵
java·开发语言
椰猫子6 小时前
Java:异常(exception)
java·开发语言
win x7 小时前
Redis 使用~如何在Java中连接使用redis
java·数据库·redis
星晨雪海7 小时前
基于 @Resource 的支付 Service 多实现类完整示例
java·开发语言
阿维的博客日记7 小时前
什么是逃逸分析
java·juc
Ricky_Theseus8 小时前
C++右值引用
java·开发语言·c++
Rick19938 小时前
Java内存参数解析
java·开发语言·jvm
我是大猴子8 小时前
Spring代理类为何依赖注入失效?
java·后端·spring
勿忘,瞬间8 小时前
多线程之进阶修炼
java·开发语言