@Version("1.0")

Package org.eclipse.microprofile.config.inject

CDI Support for Microprofile Config

Microprofile Config also supports injection via a JSR-330 DI container:

  @Inject
  @ConfigProperty(name="myproject.some.endpoint.url");
  private String restUrl;
 

The following types can be injected:

  • T where T is a Type where a Converter exists and the property must exist.
  • Optional<T> where T is a Type where a Converter exists where the property may exist.
  • Provider<T> where T is a Type where a Converter exists where the property may exist.