Hands-On Enterprise Java Microservices with Eclipse MicroProfile
上QQ阅读APP看书,第一时间看更新

Reading configuration from the MicroProfile Config API

The MicroProfile Config specification defines two objects to read the value of configuration parameters:

  • The Config object to programmatically access the configuration values
  • The @ConfigProperty annotation to inject the configuration values using Contexts and Dependency Injection (CDI)

Let's discuss them in detail.