Interface ConfigModifier<C extends io.dropwizard.core.Configuration>
- Type Parameters:
C- configuration type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Modifier is called before application run phase. Only logger configuration is applied at this moment (and so you can't change it). Modifier would work with both yaml and instance-based configurations.
Could be declared in:
- ExtensionBuilder.configModifiers(ConfigModifier[]) extension builder (same for dropwizard extension)
- TestGuiceyApp.configModifiers() extension annotation (same for
dropwizard annotation)
- TestSupport.build(Class) - generic test support object builder
- TestSupport.buildCommandRunner(Class) - generic test command runner
- GuiceyTestSupport.configModifiers(ConfigModifier[]) - guicey support
object (directly)
- CommandTestSupport.configModifiers(ConfigModifier[]) - command
support object (directly)
To enable support for DropwizardTestSupport custom command factory must be used:
ConfigOverrideUtils.buildCommandFactory(java.util.List).
- Since:
- 04.03.2025
-
Method Summary
-
Method Details
-
modify
Called before application run phase. Only logger configuration is applied at this moment (and so you can't change it). Modifier would work with both yaml and instance-based configurations.- Parameters:
config- configuration instance- Throws:
Exception- on error (to avoid try-catch blocks in modifier itself)
-