Package com.lucidworks.apollo.config
Class ConfigResourceLoaderFactory
java.lang.Object
com.lucidworks.apollo.config.ConfigResourceLoaderFactory
Load config objects from a system resource
Expects a JSON file with an object of objects which map to POJOs
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
ConstructorsConstructorDescriptionConfigResourceLoaderFactory(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionloadConfigsFromResource(String resourceName, Class<T> clazz, ClassLoader classLoader)
-
Constructor Details
-
ConfigResourceLoaderFactory
public ConfigResourceLoaderFactory(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
loadConfigsFromResource
public <T> ConfigResourceLoaderFactory.ConfigResourceLoader<T> loadConfigsFromResource(String resourceName, Class<T> clazz, ClassLoader classLoader) - Type Parameters:
T-- Parameters:
resourceName-clazz-classLoader- - in Java 9+ resources are private to its modules by default. In order to find it the classLoader of jar of the resource must be provided- Returns:
-