Skip to content

Commit a2844e0

Browse files
committed
Fix #33288: do not load demo config if using non-default config file
1 parent 2a1dcac commit a2844e0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/eu/openanalytics/containerproxy/ContainerProxyApplication.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ public static void main(String[] args) {
112112

113113
app.addListeners(new LoggingConfigurer());
114114

115-
boolean hasExternalConfig = Files.exists(Paths.get(CONFIG_FILENAME));
115+
boolean hasExternalConfig = Files.exists(Paths.get(CONFIG_FILENAME))
116+
|| System.getProperty("spring.config.location") != null
117+
|| System.getenv("SPRING_CONFIG_LOCATION") != null
118+
|| Arrays.asList(args).contains("--spring.config.location");
119+
116120
if (!hasExternalConfig) {
117121
app.setAdditionalProfiles(CONFIG_DEMO_PROFILE);
118122
Logger log = LogManager.getLogger(ContainerProxyApplication.class);

0 commit comments

Comments
 (0)