Skip to content

Commit

Permalink
Merge pull request #22415 from geoand/#22407
Browse files Browse the repository at this point in the history
Bring back erroneously removed Flyway Dev Console route handler
  • Loading branch information
geoand authored Dec 20, 2021
2 parents bc0c1dd + 9cd2148 commit fc71715
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.quarkus.flyway;

import static io.quarkus.deployment.annotations.ExecutionTime.RUNTIME_INIT;
import static java.util.List.of;

import java.nio.file.Files;
Expand All @@ -15,6 +16,7 @@
import io.quarkus.agroal.spi.JdbcInitialSQLGeneratorBuildItem;
import io.quarkus.deployment.IsDevelopment;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem;
import io.quarkus.dev.config.CurrentConfig;
import io.quarkus.dev.console.DevConsoleManager;
Expand All @@ -24,6 +26,7 @@
import io.quarkus.flyway.runtime.FlywayBuildTimeConfig;
import io.quarkus.flyway.runtime.FlywayContainersSupplier;
import io.quarkus.flyway.runtime.FlywayDataSourceBuildTimeConfig;
import io.quarkus.flyway.runtime.devconsole.FlywayDevConsoleRecorder;
import io.vertx.core.MultiMap;
import io.vertx.ext.web.RoutingContext;

Expand All @@ -36,6 +39,12 @@ public DevConsoleRuntimeTemplateInfoBuildItem collectBeanInfo(
curateOutcomeBuildItem);
}

@BuildStep
@Record(value = RUNTIME_INIT, optional = true)
DevConsoleRouteBuildItem invokeEndpoint(FlywayDevConsoleRecorder recorder) {
return new DevConsoleRouteBuildItem("datasources", "POST", recorder.handler());
}

@BuildStep
DevConsoleRouteBuildItem invokeEndpoint(List<JdbcInitialSQLGeneratorBuildItem> generatorBuildItem,
FlywayBuildTimeConfig buildTimeConfig,
Expand Down

0 comments on commit fc71715

Please sign in to comment.