Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
BJ Hargrave edited this page Dec 1, 2017 · 7 revisions

Short Name

Use Eclipse MicroProfile Config to configure your application

Short Description

Applications generally need to be configured when deployed. Use Eclipse MicroProfile Config to easily configure your application from a variety of configuration sources such as system properties and the system environment variables.

Offering Type

Java

Introduction

Most applications need to be configured based on a running environment. It must be possible to modify configuration data from outside an application so that the application itself does not need to be repackaged.

The configuration data can come from different locations and in different formats. For example, system properties, system environment variables, properties files or resources, XML files or resources, and even datasources. MicroProfile Config calls these sources of configuration data ConfigSources. Since the same configuration property could be defined in multiple ConfigSources, a prioritization can be used to determine which ConfigSource is used for the configuration property value.

Sometimes configuration values can change dynamically. Applications need to be able to access the latest configuration values without the need to be restarted. This is particularly important for microservices running in a cloud environment. MicroProfile Config support dynamically updating configuration values.

MicroProfile is a baseline platform definition that optimizes Enterprise Java for a microservices architecture and delivers application portability across multiple MicroProfile runtimes.

Author

BJ Hargrave

Code

https://github.com/IBM/java-microprofile-config

Demo

N/A

Video

N/A

Overview

The application in this repository demonstrates the features of the MicroProfile Config API on Open Liberty. The code includes using dependency injection to receive configuration including dynamic configuration and converters.

Flow

  1. User makes a REST request to the Open Liberty server.
  2. JAX-RS directs the request to the application.
  3. The application requests configuration data from the Open Liberty server via the MicroProfile Config API.
  4. The Open Liberty server consults the Config Sources for configuration data.
  5. The Open Liberty server consults the Converters to convert the configuration data into the desired types.
  6. The application responds to the JAX-RS request with a JSON result.
  7. The Open Liberty server delivers the response to the user.

Included components

  • MicroProfile Config API: Configuration for MicroProfile
  • Open Liberty: Open Liberty is an open source implementation of Eclipse MicroProfile and Java EE from IBM. It is the foundation of the WebSphere Liberty app server.
  • MicroProfile: Optimize Enterprise Java for a microservices architecture.
  • JAX-RS: Java API for RESTful Web Services or JAX-RS is an API specifications for creating web services using the Representational State Transfer (REST) architectural pattern.

Featured technologies

  • Java: A secure, object-oriented programming language for creating applications.

Blog

See https://github.com/IBM/java-microprofile-config/wiki/Blog.

Links

Clone this wiki locally