title: How to create custom dialect and add it to application.yml file in Grails 3?
body: <p>I am creating a REST API using <strong>Grails 3</strong> and Spring Security Rest plugin.<br />
  I am using <strong>MySQL</strong> as my back end.<br />
  But I always get a 401 error whenever I try to send a request to the /api/login endpoint.<br />
  Hence, I am assuming that boolean properties of my Domain class are not being mapped properly in the MySQL database. Hence, Spring Security is throwing 401 error.<br />
  In short, I want to create the following <strong>custom dialect</strong></p>
  <pre><code>package com.yourcompany.yourapp
  
  import java.sql.Types
  import org.hibernate.dialect.MySQL5InnoDBDialect
  
  class MyDialect extends MySQL5InnoDBDialect {
     public MyDialect() {
        registerColumnType(Types.BIT, &quot;boolean&quot;)
     }
  }  
  </code></pre>
  <p>But I am confused as to how to do it. Should I create a new java file or a Groovy file? Also in which directory within my grails app directory should I create my custom dialect?</p>
  <p>Also I need to know what changes should I make in my <strong>application.yml</strong> file so as to use my custom dialect.</p>
  <p>Any kind of help is highly appreciated. Thank you!</p>