java - When to use DropWizard bundles? -


i curious elusive - potentially powerful - dropwizard feature called bundles. according docs:

a dropwizard bundle reusable group of functionality, used define blocks of application’s behavior.

given dropwizard (dw) extremely documented, i’m shocked explanation on bundles. see few examples of them in wild:

but don’t understand is: bundles seem code packaged , distributed in jars. why can’t write “raw” (non-“bundle”-compliant) java classes need, slap them in jar, include jar on build/compile classpath, ad use them in dw app? of use dw bundle, , when should 1 use them?

bundles addons dropwizard make easy add small pieces of functionality. example, if use assets bundle, can attach ui api testing purposes , run on same port , easy use. example migrations bundle ties liquibase dropwizard can run database migrations same jar. works since api accessing sql database has connection parameters defined in yml file, migrations able run on same database.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -