title: Spring-Boot, Can't save unicode string in MySql using spring-data JPA
body: <p>I have my  <code>application.properties</code> set up like this :</p>
  
  <pre><code>spring.datasource.username = root
  spring.datasource.password = root
  spring.datasource.url = jdbc:mysql://localhost:3306/dbname?useUnicode=yes&amp;characterEncoding=UTF-8
  spring.datasource.driver-class-name=com.mysql.jdbc.Driver
  spring.jpa.show-sql = true
  spring.jpa.hibernate.ddl-auto = update
  spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
  </code></pre>
  
  <p>And In my <code>pom.xml</code>I have property set up like this :</p>
  
  <pre><code>&lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
          &lt;start-class&gt;toyanathapi.Application&lt;/start-class&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p>My entity :
      @Entity
  public class DailyRashifalEntity {</p>
  
  <pre><code>@Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  private Long id;
  private String date;
  private int rollno;
  private String name;
  //Constructors and getters/setters 
  }
  </code></pre>
  
  <p><strong>Problem 1:</strong>  If I use the above setup I get the exception </p>
  
  <pre><code>java.sql.SQLException: Incorrect string value: '\xE0\xA4\xA7\xE0\xA4\xBE...
  </code></pre>
  
  <p><strong>Problem 2 :</strong> If I change the datasource url into this :</p>
  
  <pre><code>spring.datasource.url = jdbc:mysql://localhost:3306/dbname
  </code></pre>
  
  <p>The unicodes in my database get saved like this </p>
  
  <pre><code> 29 | 2074-03-04 |        3 | ?????????????? ?????,?????? ??????, ??????????? ????? ? ???? ???? ???? ??????  
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/5zZWR.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5zZWR.png" alt="enter image description here"></a></p>
  
  <p><strong>How</strong> can I <strong>save</strong> them in Mysql like they are in <strong>unicode</strong> <strong>instead of</strong> getting all the unicode data <strong>converted</strong> into <code>????????</code> .</p>