Class ConfigArgsConfigSource
java.lang.Object
io.smallrye.config.common.AbstractConfigSource
io.smallrye.config.MapBackedConfigValueConfigSource
io.smallrye.config.PropertiesConfigSource
org.keycloak.quarkus.runtime.configuration.ConfigArgsConfigSource
- All Implemented Interfaces:
io.smallrye.config.ConfigValueConfigSource,Serializable,org.eclipse.microprofile.config.spi.ConfigSource
public class ConfigArgsConfigSource
extends io.smallrye.config.PropertiesConfigSource
A configuration source for mapping configuration arguments to their corresponding properties so that they can be recognized when building and running the server.
The mapping is based on the system property kc.config.args, where the value is a comma-separated list of
the arguments passed during build or runtime. E.g: "--http-enabled=true,--http-port=8180,--database-vendor=postgres".
Each argument is going to be mapped to its corresponding configuration property by prefixing the key with the MicroProfileConfigProvider.NS_KEYCLOAK namespace.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.smallrye.config.ConfigValueConfigSource
io.smallrye.config.ConfigValueConfigSource.ConfigValueMapStringView, io.smallrye.config.ConfigValueConfigSource.ConfigValueMapView, io.smallrye.config.ConfigValueConfigSource.ConfigValueProperties -
Field Summary
FieldsFields inherited from interface org.eclipse.microprofile.config.spi.ConfigSource
CONFIG_ORDINAL, DEFAULT_ORDINAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReads the previously set system property for the originally command.io.smallrye.config.ConfigValuegetConfigValue(String propertyName) static voidparseConfigArgs(List<String> args, BiConsumer<String, String> valueArgConsumer, Consumer<String> unaryConsumer) static voidsetCliArgs(String... args) Methods inherited from class io.smallrye.config.PropertiesConfigSource
urlToConfigValueMapMethods inherited from class io.smallrye.config.MapBackedConfigValueConfigSource
getConfigValueProperties, getPropertyNamesMethods inherited from class io.smallrye.config.common.AbstractConfigSource
getName, getOrdinal, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.microprofile.config.spi.ConfigSource
getName, getOrdinalMethods inherited from interface io.smallrye.config.ConfigValueConfigSource
getProperties, getValue
-
Field Details
-
SPI_OPTION_PREFIX
- See Also:
-
SHORT_OPTIONS_ACCEPTING_VALUE
-
CLI_ARGS
- See Also:
-
NAME
- See Also:
-
-
Constructor Details
-
ConfigArgsConfigSource
protected ConfigArgsConfigSource()
-
-
Method Details
-
setCliArgs
-
getAllCliArgs
Reads the previously set system property for the originally command. Use the System variable, when you trigger other command executions internally, but need a reference to the actually invoked command.- Returns:
- the invoked command from the CLI, or empty List if not set.
-
getConfigValue
- Specified by:
getConfigValuein interfaceio.smallrye.config.ConfigValueConfigSource- Overrides:
getConfigValuein classio.smallrye.config.MapBackedConfigValueConfigSource
-
parseConfigArgs
-