Package me.nickhanson.codeforge.config
Class EnvConfig
java.lang.Object
me.nickhanson.codeforge.config.EnvConfig
Utility class for fetching environment-specific configuration properties.
The environment is determined by the "APP_ENV" environment variable,
defaulting to "dev" if not set.
- Author:
- Nick Hanson
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringget(org.apache.logging.log4j.Logger logger, Properties props, String baseKey) Get the environment-specific property value.
-
Method Details
-
get
Get the environment-specific property value.- Parameters:
props- the Properties objectbaseKey- the base key (without environment suffix)- Returns:
- the property value for the current environment
- Throws:
IllegalStateException- if the property is missing
-