I am using Spring Boot 1.5.2.RELEASE, and when trying to use the import.sql file to add demo data with Arabic letters as follows:
INSERT INTO city (active, name_arabic,name_english) VALUES (b'1', 'الرياض','Riyadh');
The value is inserted in the database as : الرياض
I tried adding the following to application.properties with no luck:
spring.datasource.connectionProperties=useUnicode=true;characterEncoding=utf-8;autoReconnect=true;useSSL=false
spring.datasource.sql-script-encoding=UTF-8
The database I am using is MySQL and the collation is UTF8_GENERAL_CI
.
This issue happens only when I run the project on server, if run a unit test or build the application with Maven the issue doesn't happen.