引起原因:org.hibernate.MappingException:无法确定com.fasterxml.jackson.databind.JsonNode的类型. [英] Caused by: org.hibernate.MappingException: Could not determine type for: com.fasterxml.jackson.databind.JsonNode

查看:109
本文介绍了引起原因:org.hibernate.MappingException:无法确定com.fasterxml.jackson.databind.JsonNode的类型.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用javax.persistence.*通过使用@Entity自动创建表. 这是一些问题. 无论如何,是否可以通过使用注释将JsonNode转换为String.

I am trying to use javax.persistence.* to auto create Table by uesing @Entity. Here is some problem. Is there anyway to convert the JsonNode to String By use Annotation.

Jpa是Spring-Data-Jpa,而JsonNode是fastxml.jackson

edit: the Jpa is Spring-Data-Jpa and the JsonNode is fasterxml.jackson

推荐答案

您不能使用Spring Data Jpa在实体列上使用JsonNode,必须使用String,并且在另一个类中,您可以编写将字符串转换为Json的方法(将Jason反转为字符串)格式并解决!

You cannot use a JsonNode on entity column using Spring Data Jpa, You must use String and in another class you can write a method which converts string to Json (a reverse Jason to string) format and Resolved!

这篇关于引起原因:org.hibernate.MappingException:无法确定com.fasterxml.jackson.databind.JsonNode的类型.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆