1
1
package io .avaje .config ;
2
2
3
- import io .avaje .config .CoreEntry .CoreMap ;
4
- import org .jspecify .annotations .Nullable ;
5
-
6
- import java .io .*;
3
+ import java .io .File ;
4
+ import java .io .FileInputStream ;
5
+ import java .io .FileNotFoundException ;
6
+ import java .io .InputStream ;
7
+ import java .io .UncheckedIOException ;
7
8
import java .lang .System .Logger .Level ;
8
9
import java .util .ArrayList ;
9
10
import java .util .LinkedHashSet ;
10
11
import java .util .List ;
11
12
import java .util .Set ;
13
+ import java .util .StringJoiner ;
14
+
15
+ import org .jspecify .annotations .Nullable ;
16
+
17
+ import io .avaje .config .CoreEntry .CoreMap ;
12
18
13
19
/**
14
20
* Manages the underlying map of properties we are gathering.
@@ -127,9 +133,7 @@ CoreMap entryMap() {
127
133
return map ;
128
134
}
129
135
130
- /**
131
- * Read the special properties that can point to an external properties source.
132
- */
136
+ /** Read the special properties that can point to an external properties source. */
133
137
String indirectLocation () {
134
138
String location = System .getProperty ("load.properties" );
135
139
if (location != null ) {
@@ -139,7 +143,12 @@ String indirectLocation() {
139
143
if (indirectLocation == null ) {
140
144
indirectLocation = map .get ("load.properties.override" );
141
145
}
142
- return indirectLocation == null ? null : indirectLocation .value ();
146
+ var result = indirectLocation == null ? null : indirectLocation .value ();
147
+ if (result != null && indirectLocation .needsEvaluation ()) {
148
+ result = eval (result );
149
+ map .put ("load.properties" , result , "" );
150
+ }
151
+ return result ;
143
152
}
144
153
145
154
String profiles () {
0 commit comments