All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.trib3.server.config.dropwizard.HoconConfigurationFactoryFactory.kt Maven / Gradle / Ivy

package com.trib3.server.config.dropwizard

import com.fasterxml.jackson.databind.ObjectMapper
import com.trib3.config.ConfigLoader
import io.dropwizard.configuration.ConfigurationFactory
import io.dropwizard.configuration.ConfigurationFactoryFactory
import javax.inject.Inject
import javax.validation.Validator

/**
 * Bootstrap hook to allow dropwizard config to be provided by a [HoconConfigurationFactory]
 */
class HoconConfigurationFactoryFactory
@Inject constructor(val configLoader: ConfigLoader) : ConfigurationFactoryFactory {
    override fun create(
        klass: Class,
        validator: Validator,
        objectMapper: ObjectMapper,
        propertyPrefix: String
    ): ConfigurationFactory {
        return HoconConfigurationFactory(
            klass,
            validator,
            objectMapper,
            configLoader
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy