Java Magazine, Nov/Dec 2017
ORACLE COM JAVAMAGAZINE NOVEMBER DECEMBER 2017 57 java ee microservice implementation configurable resilient robust and secure In this article I provide usage details for the APIs corresponding to these specifications I expect youll like how well the services address microservices issues and how straightforward the APIs are MicroProfile Config The MicroProfile Config specification provides the ability to separate the implementation from its configuration so that deployments of an artifact can behave diferently It also enables modification of the configuration of a microservice for instance in a dynamic way without the need of repackaging or redeploying artifacts The MicroProfile Config feature achieves this by aggregating the configurations from many diferent sources such as system properties environment variables and the META INF microprofile config properties file or from custom ConfigSource implementations and presents the complete configuration as a single merged view to the user The current available version of the API is 11 Its artifact can be retrieved via Maven as shown in Listing 1 with the dependency definition The artifact is already available in the central Maven repository Its also worth mentioning that this API requires at least Java 8 in order to run Here is how to include it in a Maven based project Listing 1 dependency groupId org eclipse microprofile config groupId artifactId microprofile config api artifactId version 11 version dependency repositories Keep in mind that this refers just to the API and it will be backed up by an implementation coming from the MicroProfile runtimes distributed via vendors Lets continue with code samples on how the API can be used
You must have JavaScript enabled to view digital editions.