title: How to use Spring boot, JOOQ and Flyway together?
body: <p>So, let's consider a general <code>Spring boot</code> application, which uses <code>JOOQ</code> for database database access, and <code>Flyway</code> for database migration. The project uses <code>gradle</code> for dependency management.</p>
  
  <p>I want the following things:</p>
  
  <ol>
  <li>Run my application in docker. So, I want to use only in environment variables (<a href="https://12factor.net/config" rel="nofollow noreferrer"><a href="https://12factor.net/config" rel="nofollow noreferrer">https://12factor.net/config</a></a>). Hence, I don't know, how to configure <strong>both</strong> spring boot application properties (database login and password) and gradle JOOQ plugin database login and password. </li>
  <li>Automatic generation JOOQ classes. Flyway migration runs, when an application has started. But JOOQ generates code in <code>gradle build</code> task. So, we see wrong order of tasks execution.</li>
  </ol>