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>

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.
  • 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 class
      validator - the validator to use
      objectMapper - the Jackson ObjectMapper to use
      propertyPrefix - the system property name prefix used by overrides