close liquibase instance

This commit is contained in:
Athou
2021-12-23 15:04:32 +01:00
parent 8e1aad655a
commit 22beeabb9b

View File

@@ -63,8 +63,10 @@ public class StartupService implements Managed {
}
ResourceAccessor accessor = new ClassLoaderResourceAccessor(Thread.currentThread().getContextClassLoader());
Liquibase liq = new Liquibase("migrations.xml", accessor, database);
liq.update("prod");
try (Liquibase liq = new Liquibase("migrations.xml", accessor, database)) {
liq.update("prod");
}
} catch (Exception e) {
throw new RuntimeException(e);
}