public final class CommandSupport
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
initCommands(java.util.List<io.dropwizard.cli.Command> commands,
com.google.inject.Injector injector)
Inject dependencies into all registered environment commands.
|
static void |
registerCommands(io.dropwizard.setup.Bootstrap bootstrap,
ClasspathScanner scanner)
Scans classpath to find commands and register them.
|
public static void registerCommands(io.dropwizard.setup.Bootstrap bootstrap, ClasspathScanner scanner)
EnvironmentCommand
should have constructor with Application
argument.bootstrap
- bootstrap objectscanner
- configured scanner instancepublic static void initCommands(java.util.List<io.dropwizard.cli.Command> commands, com.google.inject.Injector injector)
commands
- registered commandsinjector
- guice injector object