java - 如何创建我自己的自定义 Dropwizard 包?

标签 java bundle dropwizard

在文档中只有一个关于包的简短说明:

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

仅此而已。我知道有称为 Bundle、ConfiguredBundle 和 ManagedBundle 的接口(interface),但是既没有示例也没有教程如何使用这些接口(interface)。

谁能举个例子?

最佳答案

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.

我强烈建议查看 this git 存储库,那里有 2 或 3 个示例,可能会让您更好地了解 Dropwizard Bundle 是什么。

关于java - 如何创建我自己的自定义 Dropwizard 包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34825213/

相关文章:

java - 如何直接访问 Dropwizard 资源,而不是通过 REST

java - ActiveJDBC 和 Dropwizard 集成

react-native - React Native 无法加载包

php - 如何在 symfony 中重命名一个包?

java - Dropwizard 0.7.1 与 0.6.2 : different YML configuration parser?

java - Maven 无法处理 Unicode 字符

java - Jawr 不能包含单个 CSS 文件

java - 为什么我的计时器根本不启动以及它应该如何停止?

java - 系统找不到指定的路径

ubuntu - 在 Ubuntu 上安装 Teambox。 Gherkin 2.3.3 安装失败