2

In the documentation there is just a short note about bundles :

A Dropwizard bundle is a reusable group of functionality, used to define blocks of an application’s behavior.

And that's all. I know that there's interface called Bundle, ConfiguredBundle and ManagedBundle, but there's neither example nor tutorial how to use these interfaces.

Can someone show an example?

VanDavv
  • 726
  • 2
  • 10
  • 30

1 Answers1

0

Possible duplicate of Looking for a dropwizard

Bundles are like addons to Dropwizard that make it very easy to add small pieces of functionality. For example, if you use the assets bundle, you can attach a UI to your API for testing purposes and it will run on the same port and is very easy to use. Another example would be the Migrations Bundle that easily ties Liquibase into Dropwizard so you can run database migrations with the same jar. This also works well since your API could be accessing some sql database which has connection parameters defined in a yml file, the migrations would be able to run on the same database.

I highly suggest looking into this git repository, there are 2 or 3 examples there which might give you a better idea on what Dropwizard Bundles are.

Community
  • 1
  • 1
ctotolin
  • 183
  • 5