java.lang.Object
io.helidon.common.config.GlobalConfig
Global configuration can be set by a user before any Helidon code is invoked, to override default discovery
of configuration done by Helidon components.
If method config(java.util.function.Supplier)
is called before Helidon is started, Helidon will only use that
configuration.
You may still use custom instances of configuration when using configurable APIs directly.
-
Method Details
-
configured
public static boolean configured()Whether a global configuration has already been configured.- Returns:
true
if there is a global configuration set already,false
otherwise
-
config
Global configuration instance.- Returns:
- Helidon shared configuration instance if configured, or an empty configuration if not
- See Also:
-
config
Set global configuration if not yet configured.- Parameters:
config
- configuration supplier to use if config is not yet configured- Returns:
- used global configuration instance
-
config
Set global configuration.- Parameters:
config
- configuration to useoverwrite
- whether to overwrite an existing configured value- Returns:
- current global config
-