Touchy Typesafe Config

Support for Typesafe Config in Touchy

License

License

Categories

Categories

config Application Layer Libs Configuration
GroupId

GroupId

com.github.sursmobil
ArtifactId

ArtifactId

touchy-typesafe-config
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

Touchy Typesafe Config
Support for Typesafe Config in Touchy
Project URL

Project URL

http://github.com/sursmobil/touchy-typesafe-config
Source Code Management

Source Code Management

http://github.com/sursmobil/touchy-typesafe-config.git

Download touchy-typesafe-config

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
com.github.sursmobil : touchy jar 0.1.0
com.typesafe : config jar 1.3.0

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Touchy Typesafe Config - Support for Config by Typesafe in Touchy

Include in project

This project can be found in Maven Central Repository. For example to include it in gradle project add following dependency:

  'com.github.sursmobil:touchy-typesafe-config:0.1.0'

Usage

This library adds new plugin to Touchy which will be loaded by default. As of version 0.1.0 this plugin includes single ValueSource: TypesafeConfig, which allow config to be used from Touchy. TypesafeConfig load Config using ConfigFactory.load(). Property name in Source annotation should be given as absolute property path. Example Touchy config using this plugin could look like following:

  public abstract class ServerConfig {

      @Source(type = TypesafeConfig.class, property = "myapp.server.host", priority = 1)
      public String getHost() {
        return "localhost"
      }

      @Source(type = TypesafeConfig.class, property = "myapp.server.port", priority = 1)
      int getPort();

  }

and configuration in application.conf used by this implementation:

  myapp {
      server{
          host = "127.0.0.1"
          port = 1234
      }
  }

Versions

Version
0.1.0