diff --git a/src/main/java/io/bootique/liquibase/LiquibaseModuleProvider.java b/src/main/java/io/bootique/liquibase/LiquibaseModuleProvider.java index bc6c8b2..6e3f667 100644 --- a/src/main/java/io/bootique/liquibase/LiquibaseModuleProvider.java +++ b/src/main/java/io/bootique/liquibase/LiquibaseModuleProvider.java @@ -19,35 +19,22 @@ package io.bootique.liquibase; -import io.bootique.BQModuleMetadata; import io.bootique.BQModuleProvider; -import io.bootique.di.BQModule; +import io.bootique.bootstrap.BuiltModule; import io.bootique.jdbc.JdbcModuleProvider; -import java.lang.reflect.Type; import java.util.Collection; import java.util.Collections; -import java.util.Map; public class LiquibaseModuleProvider implements BQModuleProvider { @Override - public BQModule module() { - return new LiquibaseModule(); - } - - @Override - public Map configs() { - // TODO: config prefix is hardcoded. Refactor away from ConfigModule, and make provider - // generate config prefix, reusing it in metadata... - return Collections.singletonMap("liquibase", LiquibaseRunnerFactory.class); - } - - @Override - public BQModuleMetadata.Builder moduleBuilder() { - return BQModuleProvider.super - .moduleBuilder() - .description("Provides integration with Liquibase SQL migrations framework."); + public BuiltModule buildModule() { + return BuiltModule.of(new LiquibaseModule()) + .provider(this) + .description("Integrates Liquibase database migrations library") + .config("liquibase", LiquibaseRunnerFactory.class) + .build(); } @Override