Spring-Boot, Can't save unicode string in MySql using spring-data JPA
In your /etc/mysql/my.cnf
file change the following.
[mysql]
default-character-set=utf8
[mysqld]
character-set-server=utf8
Keep your hibernate configuration Like this
jdbc:mysql://localhost:3306/dbname?useUnicode=yes&characterEncoding=UTF-8
And Change your DB Collation Like this
ALTER TABLE tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
More information : Link
See "question marks" in http://stackoverflow.com/questions/38363566/trouble-with-utf8-characters-what-i-see-is-not-what-i-stored .
Also,
⚈ spring.jpa.properties.hibernate.connection.characterEncoding=utf-8
⚈ spring.jpa.properties.hibernate.connection.CharSet=utf-8
⚈ spring.jpa.properties.hibernate.connection.useUnicode=true