mp-config-db

ConfigurationSource for eclipse microprofile config based on a database

Лицензия

Лицензия

Категории

Категории

config Библиотеки уровня приложения Configuration
Группа

Группа

ch.carve
Идентификатор

Идентификатор

mp-config-db
Последняя версия

Последняя версия

0.8
Дата

Дата

Тип

Тип

jar
Описание

Описание

mp-config-db
ConfigurationSource for eclipse microprofile config based on a database
Ссылка на сайт

Ссылка на сайт

https://github.com/rikcarve/mp-config-db
Система контроля версий

Система контроля версий

https://github.com/rikcarve/mp-config-db.git

Скачать mp-config-db

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/ch.carve/mp-config-db/ -->
<dependency>
    <groupId>ch.carve</groupId>
    <artifactId>mp-config-db</artifactId>
    <version>0.8</version>
</dependency>
// https://jarcasting.com/artifacts/ch.carve/mp-config-db/
implementation 'ch.carve:mp-config-db:0.8'
// https://jarcasting.com/artifacts/ch.carve/mp-config-db/
implementation ("ch.carve:mp-config-db:0.8")
'ch.carve:mp-config-db:jar:0.8'
<dependency org="ch.carve" name="mp-config-db" rev="0.8">
  <artifact name="mp-config-db" type="jar" />
</dependency>
@Grapes(
@Grab(group='ch.carve', module='mp-config-db', version='0.8')
)
libraryDependencies += "ch.carve" % "mp-config-db" % "0.8"
[ch.carve/mp-config-db "0.8"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.30

provided (3)

Идентификатор библиотеки Тип Версия
org.eclipse.microprofile.config : microprofile-config-api jar 2.0
jakarta.platform : jakarta.jakartaee-api jar 8.0.0
org.projectlombok : lombok jar 1.18.8

test (3)

Идентификатор библиотеки Тип Версия
org.junit.jupiter : junit-jupiter jar 5.7.0
org.mockito : mockito-core jar 3.6.0
io.smallrye.config : smallrye-config jar 2.0.2

Модули Проекта

Данный проект не имеет модулей.

Build Status codecov Maven Central

mp-config-db

A eclipse microprofile config extension which uses a database as source.

Versions

0.7 -> Microprofile config 1.4
0.8 -> Microprofile config 2.0

Overview

The eclipse microprofile config framework is a simple yet powerful configuration framework for Java EE. But most implementations only provide the system/env properties or property files as configuration source. This small library provides an ConfigSource implementation which reads the values from the default datasource. For performance reasons, the config values are cached.

Add dependency

        <dependency>
            <groupId>ch.carve</groupId>
            <artifactId>mp-config-db</artifactId>
            <version>0.8</version>
        </dependency>

Configuration

Currently there are 5 values you can configure, either through Java system properties or environment variables:

  • configsource.db.datasource override default datasource by setting JNDI name of the datasource
  • configsource.db.table table name for configuration records, default value is "configuration"
  • configsource.db.key-column name of the column containing the key, default value is "key"
  • configsource.db.value-column name of the column containing the value, default value is "value"
  • configsource.db.validity how long to cache values (in seconds), default is 30s

Ordinal

Config sources have priorities called ordinal. This config source has ordinal 450, but can be overriden with setting 'configsource.db.ordinal' in one of the default config sources (NOT in this source like specified in the spec, as the datasource is not yet ready when getOrdinal() is called).

Hint

Use memory config source from microprofile-extensions to get a REST interface and the possibility to change values on the fly (in-memory)

Links

Версии библиотеки

Версия
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1