Share your experience with Database DevOps by taking part in the 2021 State of Database DevOps survey Take the survey

Community Plugins and Integrations: Dropwizard

Application startup

While Dropwizard doesn’t come with out-of-the-box integration for Flyway you can easily run Flyway on application startup by adding flyway-core to your pom.xml:


And calling Flyway from your application class:

public class MyApplication extends Application<MyConfiguration> {

    public void run(MyConfiguration configuration, Environment environment) {
        DataSourceFactory dataSourceFactory = configuration.getDataSourceFactory();
        Flyway flyway = new Flyway();
        flyway.setDataSource(dataSourceFactory.getUrl(), dataSourceFactory.getUser(), dataSourceFactory.getPassword());

CLI add-on

Jochen Schalanda has created a great Dropwizard Add-On that adds Flyway commands to the CLI of your Dropwizard application.

The website also comes with comprehensive documentation on usage and configuration.

Want to deploy your Dropwizard apps effortlessly to AWS? Follow our 5 minute tutorial using Boxfuse