且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

JPA utf-8 字符未保留

更新时间:2023-11-27 15:57:40

使用persistence.xml文件属性中的字符编码

use the character encoding in the property of persistence.xml file

<property name="javax.persistence.jdbc.url" 
   value="jdbc:mysql://localhost:3306/blogdatabase?useUnicode=yes&amp;characterEncoding=UTF-8"/>