Package io.dropwizard.configuration
Class YamlConfigurationFactory<T>
java.lang.Object
io.dropwizard.configuration.BaseConfigurationFactory<T>
io.dropwizard.configuration.YamlConfigurationFactory<T>
- Type Parameters:
T- the type of the configuration objects to produce
- All Implemented Interfaces:
ConfigurationFactory<T>
A factory class for loading YAML configuration files, binding them to configuration objects, and
validating their constraints. Allows for overriding configuration parameters from system properties.
-
Field Summary
Fields inherited from class io.dropwizard.configuration.BaseConfigurationFactory
mapper -
Constructor Summary
ConstructorsConstructorDescriptionYamlConfigurationFactory(Class<T> klass, @Nullable jakarta.validation.Validator validator, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String propertyPrefix) Creates a new configuration factory for the given class. -
Method Summary
Methods inherited from class io.dropwizard.configuration.BaseConfigurationFactory
addOverride, build, build, build, createParserMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.dropwizard.configuration.ConfigurationFactory
build
-
Constructor Details
-
YamlConfigurationFactory
public YamlConfigurationFactory(Class<T> klass, @Nullable jakarta.validation.Validator validator, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String propertyPrefix) Creates a new configuration factory for the given class.- Parameters:
klass- the configuration classvalidator- the validator to useobjectMapper- the JacksonObjectMapperto usepropertyPrefix- the system property name prefix used by overrides
-