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>
- Direct Known Subclasses:
POJOConfigurationFactory
public class YamlConfigurationFactory<T> extends BaseConfigurationFactory<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
Constructors Constructor Description 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.
-
Method Summary
-
Methods inherited from class io.dropwizard.configuration.BaseConfigurationFactory
addOverride, build, build, build, createParser
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.dropwizard.configuration.ConfigurationFactory
build
-
-
-
-
Constructor Detail
-
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 JacksonObjectMapper
to usepropertyPrefix
- the system property name prefix used by overrides
-
-