The configured value // will not lead to a DeploymentException if the value is missing. You can also use the specialized Optional classes like OptionalInt, // OptionalDouble, or OptionalLong to perform the injection. Contrary to natively injecting the configured value, this will not lead to a //DeploymentException if the value is missing. The following code injects an Optional value of property.
A default value can also be specified like any other configuration. The // configured value will not lead to a DeploymentException if the value is missing. You can also inject a configuration using the ConfigValue metadata object. The property must exist with a non-empty value, otherwise a //DeploymentException will be thrown. Specification public class InjectedConfigUsageSample private Config config Release Notes for MicroProfile Config 1.1 Release Notes for MicroProfile Config 1.2 Release Notes for MicroProfile Config 1.3
Release Notes for MicroProfile Config 1.4 Release Notes for MicroProfile Config 2.0 Release Notes for MicroProfile Config 3.0 Custom ConfigSources via ConfigSourceProvider Manually defining the Ordinal of a built-in ConfigSource Accessing or Creating a certain Configuration Programmatic lookup of the bean annotated with 3.5.2. Aggregate related properties into a CDI bean