Package org.gwizard.config
Class ConfigProvider<T>
java.lang.Object
org.gwizard.config.ConfigProvider<T>
- All Implemented Interfaces:
jakarta.inject.Provider<T>
Module which sets up the config file reader. The config class is dynamic.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigProvider(jakarta.validation.Validator validator, com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<?> configClass, String propertyPrefix, File configFile) ConfigProvider(ConfigModule<T> configModule, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionget()static <C> Cread(ConfigModule<C> configModule, com.fasterxml.jackson.databind.ObjectMapper mapper) Convenience method if we need to read a configuration before the injector is loaded.
-
Constructor Details
-
ConfigProvider
-
ConfigProvider
public ConfigProvider(ConfigModule<T> configModule, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
get
- Specified by:
getin interfacejakarta.inject.Provider<T>
-
read
public static <C> C read(ConfigModule<C> configModule, com.fasterxml.jackson.databind.ObjectMapper mapper) Convenience method if we need to read a configuration before the injector is loaded. For example, maybe we have some config that determines which modules to load.
-