yes
This commit is contained in:
parent
7b602a0f21
commit
90aea4a9cc
@ -35,19 +35,9 @@ public final class EnvironmentUtils {
|
||||
* Is the app running in a production environment?
|
||||
*/
|
||||
@Getter private static final boolean production;
|
||||
|
||||
/**
|
||||
* Is the app running in a test environment?
|
||||
*/
|
||||
@Getter private static boolean testing;
|
||||
|
||||
static {
|
||||
// Are we running on production?
|
||||
String appEnv = System.getenv("APP_ENV");
|
||||
production = appEnv != null && (appEnv.equals("production"));
|
||||
|
||||
// Are we running on a test environment?
|
||||
String testEnv = System.getenv("SPRING_TEST");
|
||||
testing = testEnv != null && (testEnv.equals("true"));
|
||||
}
|
||||
}
|
@ -72,7 +72,7 @@ public final class MaxMindService {
|
||||
@PostConstruct
|
||||
public void onInitialize() {
|
||||
// Load the databases
|
||||
if (!EnvironmentUtils.isTesting()) {
|
||||
if (EnvironmentUtils.isProduction()) {
|
||||
loadDatabases();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user