MySQL JSON数据类型/JPA编码问题 [英] MySQL JSON Data Type / JPA Encoding issue

查看:114
本文介绍了MySQL JSON数据类型/JPA编码问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MySQL中的JSON数据类型有问题.在该列中,我正在编写基于斯洛文尼亚字母的值.

I have an issue with JSON data type in MySQL. In that column I'm writing values that are based on slovenian letters.

以下是使用ObjectMapper编写的示例:

Here is an example that is written using ObjectMapper:

{ "formState": [{"label": "Zaduženi", "value": "Test 1"}, {"label": "Tip", "value": "Fizičko"}] }

我正在使用JPA从MySQL数据库中获取数据,并且在有效负载中,我得到的是这样的东西:

I'm using JPA to fetch data from MySQL database and in the payload I'm getting something like this:

{ "formState": [{"label": "Zaduženi", "value": "Test 1"}] }

我用来表示此JSON的Java数据类型是Map(HashMap).

The Java data type that I'm using to represent this JSON is Map (HashMap).

数据源网址为:jdbc:mysql://localhost:3306/test_db?useUnicode=true&characterEncoding=utf8&useSSL=false

有人可以帮助我解决这个问题吗?

Can someone help me with this issue?

谢谢.

推荐答案

在Hibernate Types框架中可能是一个问题.尝试使用任何现有测试用例来复制它,然后向我发送拉取请求",以便我可以发现问题.

It could be an issue in the Hibernate Types framework. Try to replicate it using any of the existing test cases and send me a Pull Request so that I could find the problem.

这篇关于MySQL JSON数据类型/JPA编码问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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