Skip to content

Commit 6679d66

Browse files
SentryManrbygrave
andauthored
Improves load.properties detection (#130)
* improve load.properties detection * #130 If System.getProperty("load.properties") is specified that takes precedence --------- Co-authored-by: Rob Bygrave <robin.bygrave@gmail.com>
1 parent eb96ae6 commit 6679d66

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

avaje-config/src/main/java/io/avaje/config/InitialLoadContext.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ CoreMap entryMap() {
137137
* Read the special properties that can point to an external properties source.
138138
*/
139139
String indirectLocation() {
140+
String location = System.getProperty("load.properties");
141+
if (location != null) {
142+
return location;
143+
}
140144
var indirectLocation = map.get("load.properties");
141145
if (indirectLocation == null) {
142146
indirectLocation = map.get("load.properties.override");

0 commit comments

Comments
 (0)