Class JsonConfigurationFactory<T>

  • Type Parameters:
    T - the type of the configuration objects to produce
    All Implemented Interfaces:
    ConfigurationFactory<T>

    public class JsonConfigurationFactory<T>
    extends BaseConfigurationFactory<T>
    A factory class for loading JSON configuration files, binding them to configuration objects, and validating their constraints. Allows for overriding configuration parameters from system properties.
    • Constructor Detail

      • JsonConfigurationFactory

        public JsonConfigurationFactory​(Class<T> klass,
                                        javax.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