org.constretto:constretto-dropwizard

A Dropwizard bundle that allows use of Constretto tags in yml-configuration

License

License

ASF v2 License
Categories

Categories

DropWizard Container Microservices
GroupId

GroupId

org.constretto
ArtifactId

ArtifactId

constretto-dropwizard
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

jar
Description

Description

org.constretto:constretto-dropwizard
A Dropwizard bundle that allows use of Constretto tags in yml-configuration
Project URL

Project URL

https://github.com/constretto/constretto-dropwizard
Source Code Management

Source Code Management

https://github.com/constretto/constretto-dropwizard

Download constretto-dropwizard

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
org.constretto : constretto-core jar 2.2.0

provided (3)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.7
io.dropwizard : dropwizard-core jar 1.0.3
com.google.guava : guava jar 19.0

test (4)

Group / Artifact Type Version
io.dropwizard : dropwizard-testing jar 1.0.3
org.mockito : mockito-all jar 1.9.5
junit : junit jar 4.11
org.easytesting : fest-assert jar 1.4

Project Modules

There are no modules declared in this project.

Dropwizard Constretto Bundle

Build Status Coverage Status Maven Central

Compabilty

Constretto DropWizard Dropwizard Java
1.1 > 1.0 >= 8
1.0 < 1.0 >= 7

What is it for?

Dropwizard bundle that allows use of Constretto tags in yml-configuration like this:

config.yml:

database:
  # the JDBC URL
  url: jdbc:oracle:thin:@//oracle-testing:1521/name
  .staging.url: jdbc:oracle:thin:@//oracle-staging:1521/name
  .production.url: jdbc:oracle:thin:@//oracle-production:1521/name

logging:
  appenders:
    - .testing:
      type: console
      threshold: DEBUG
      target: stdout

    - .staging:
      type: console
      threshold: INFO
      target: stdout

Usage

import org.constretto.dropwizard.ConstrettoBundle;

public class MyApplication extends Application<Config> {

    @Override
    public void initialize(Bootstrap<Config> configBootstrap) {
        configBootstrap.addBundle(new ConstrettoBundle());
    }
}

Maven

This component is distributed through the Sonatype OSS Repository and should thus by widely available

Add the dependency to your pom file:

    <dependency>
        <groupId>org.constretto</groupId>
        <artifactId>constretto-dropwizard</artifactId>
        <version>1.1</version>
    </dependency>

Version 1.1

  • Support for Dropwizard 1.X (thus dropping support for Java 7). Thanks to @garyschulte for PR

Version 1.0

  • Release to Sonatype OSS

Version 0.3

  • Supports tagging of list elements

Version 0.2.1

  • Updated constretto dependencies to 2.1.4

Version 0.2

  • Allows tagging with '.env.' (preferred) in addition to '@env.'. The preferred variant makes it valid yaml syntax.
  • Wraps existing ConfigurationSourceProvider to allow chaining of providers
  • Eliminates issue where duplicate property keys in different structs is mixed up
  • Fixes issue where nested values in structs failed to resolve
  • Note: replacing properties in lists is not yet supported

Version 0.1

  • Supports basic replacement of tagged attributes.
  • Tagging uses the '@' sign (which makes the text illegal yaml syntax)
org.constretto

Constretto

Versions

Version
1.1
1.0