-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22331 from radcortez/fix-19549
Configuration property to use only system sources
- Loading branch information
Showing
7 changed files
with
57 additions
and
25 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
core/deployment/src/main/java/io/quarkus/deployment/ConfigBuildTimeConfig.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.quarkus.deployment; | ||
|
||
import io.quarkus.runtime.annotations.ConfigItem; | ||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
|
||
@ConfigRoot(name = ConfigItem.PARENT, phase = ConfigPhase.BUILD_TIME) | ||
public class ConfigBuildTimeConfig { | ||
/** | ||
* <p> | ||
* Set this to <code>true</code> to read configuration from system properties and environment variables only. This | ||
* only applies to runtime. | ||
* </p> | ||
*/ | ||
@ConfigItem(name = "config.sources.system-only", defaultValue = "false") | ||
public boolean systemOnly; | ||
} |
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
16 changes: 16 additions & 0 deletions
16
...untime/src/main/java/io/quarkus/runtime/configuration/SystemOnlySourcesConfigBuilder.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.quarkus.runtime.configuration; | ||
|
||
import io.smallrye.config.SmallRyeConfigBuilder; | ||
|
||
public class SystemOnlySourcesConfigBuilder implements ConfigBuilder { | ||
@Override | ||
public SmallRyeConfigBuilder configBuilder(final SmallRyeConfigBuilder builder) { | ||
builder.getSourceProviders().clear(); | ||
return builder; | ||
} | ||
|
||
@Override | ||
public int priority() { | ||
return Integer.MAX_VALUE; | ||
} | ||
} |
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
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
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
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