Config Provider

Service Provider Interface (SPI) to define configuration.

Лицензия

Лицензия

Категории

Категории

IDE Инструменты разработки config Библиотеки уровня приложения Configuration
Группа

Группа

com.signavio.workflow
Идентификатор

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

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

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

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

Config Provider
Service Provider Interface (SPI) to define configuration.
Ссылка на сайт

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

https://github.com/signavio/configuration-provider
Система контроля версий

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

https://github.com/signavio/configuration-provider/tree/master/config-provider

Скачать config-provider

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

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

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

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

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

Configuration Provider

Service Provider Interface (SPI) to define configuration.

How it works

Provides an interface to allow custom implementations to define key/value configuration entries.

This allows a Service Loader to pick configuration from remote sources.

How to implement it

The custom configuration service provider has to implement the interface ConfigurationProvider. The dependency library can be found here

Implementation reference example

Add the dependency to your project.

Maven example:

<dependency>
    <groupId>com.signavio.workflow</groupId>
    <artifactId>config-provider</artifactId>
    <version>1.0.2</version>
</dependency>

Create a class that implements ConfigurationProvider and overrides the method Map<String, String> get().

src/main/java/com/signavio/workflow/config/ExampleConfigProvider.java

public class ExampleConfigProvider implements ConfigurationProvider {

  @Override
  public Map<String, String> get() {
    return Collections.unmodifiableMap(
        new HashMap<String, String>() {{
          put("effektif.mongodb.password", "test_password");
          put("key", "value");
        }});
  }
}

The service provider has to include a file under META-INF/services. The file name should be the fully qualified service name without any extension. Inside the file the provider has to specify the fully qualified implementation.

src/main/resources/META-INF/services/com.signavio.workflow.config.ConfigurationProvider

com.signavio.workflow.config.ExampleConfigProvider

How to deploy it

The generated implementation has to be packed as a jar file and copied under $TOMCAT_HOME/webapps/ROOT/lib directory.

After that, the application has to be restarted in order for the new configuration service to be applied.

com.signavio.workflow

Signavio GmbH

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

Версия
1.0.2
1.0.1
1.0.0