Package de.spraener.nxtgen
Class CGV19Config
java.lang.Object
de.spraener.nxtgen.CGV19Config
Responsibility:
This class provides values from the environment or from a property file to the generators. The generators can use this values in their logic or templates or whatnot.
It reads properties from a file ".cgv19.properties" and also from the environment. The properties form the ".cgv19.properties" file are read in as they are.
The environment variables have to have a prefix CGV19_ (not case-sensitive) to be accepted as configuration values. The prefix "cgv19_" is removed from the environment variables name. So an environment value of "CGV19_java_persistence=jakarta.persistence" is available under "java_persistence" in CGV19.
To access the definition of a specific value the method "definitionOf(key)" can be used.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdefinitionOf(String key) static StringdefinitionOf(String key, String defaultValue) static CGV19ConfiggetInstance(Consumer<CGV19Config>... modifiers) withEnvMapSupplier(Supplier<Map<String, String>> envMapSupplier) withPropertyReaderSupplier(Supplier<Reader> propertyReaderSupplier)
-
Constructor Details
-
CGV19Config
public CGV19Config()
-
-
Method Details
-
getInstance
-
withPropertyReaderSupplier
-
withEnvMapSupplier
-
definitionOf
-
definitionOf
-