Package org.eclipse.microprofile.config.inject


@Version("2.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.