Last active
May 12, 2020 05:13
-
-
Save zorteran/9506af43c7b38881bab2768b23cf6eb1 to your computer and use it in GitHub Desktop.
EnvTools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EnvTools { | |
public static final String INPUT_TOPIC = "INPUT_TOPIC"; | |
public static final String OUTPUT_TOPIC = "OUTPUT_TOPIC"; | |
public static final String APPLICATION_ID_CONFIG = "APPLICATION_ID_CONFIG"; | |
public static final String BOOTSTRAP_SERVERS_CONFIG = "BOOTSTRAP_SERVERS_CONFIG"; | |
public static String getEnvValue(String environmentKey, String defaultValue) | |
{ | |
String envValue = System.getenv(environmentKey); | |
if(envValue != null && !envValue.isEmpty()) | |
{ | |
return envValue; | |
} | |
return defaultValue; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment