title: Spring boot 2: Apparent connection leak detected when using Flyway
body: <p>I have spring boot 2 app, I am using Flyway for DB migrations. I programmatically execute flyway migration at the app start. When doing that I got: <strong>java.lang.Exception: Apparent connection leak detected</strong> </p>
  
  <p>On the row:</p>
  
  <pre><code>Database database = org.flywaydb.core.internal.database.DatabaseFactory.createDatabase(flyway, false);
  </code></pre>
  
  <p>Here is my Hikari CP config:</p>
  
  <pre><code>spring.datasource.max-active=20
  spring.datasource.idle-timeout=10000
  spring.datasource.initial-size=20
  spring.datasource.test-on-return=true
  spring.datasource.hikari.leak-detection-threshold=10000
  </code></pre>