Play! Constretto Module


License

License

unknown
Categories

Categories

Maven Build Tools
GroupId

GroupId

com.google.code.maven-play-plugin.org.playframework.modules.constretto
ArtifactId

ArtifactId

play-constretto
Last Version

Last Version

0.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

Play! Constretto Module
Play! Constretto Module
Source Code Management

Source Code Management

https://github.com/zapodot/constretto-play

Download play-constretto

How to add to project

<!-- https://jarcasting.com/artifacts/com.google.code.maven-play-plugin.org.playframework.modules.constretto/play-constretto/ -->
<dependency>
    <groupId>com.google.code.maven-play-plugin.org.playframework.modules.constretto</groupId>
    <artifactId>play-constretto</artifactId>
    <version>0.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.google.code.maven-play-plugin.org.playframework.modules.constretto/play-constretto/
implementation 'com.google.code.maven-play-plugin.org.playframework.modules.constretto:play-constretto:0.1.1'
// https://jarcasting.com/artifacts/com.google.code.maven-play-plugin.org.playframework.modules.constretto/play-constretto/
implementation ("com.google.code.maven-play-plugin.org.playframework.modules.constretto:play-constretto:0.1.1")
'com.google.code.maven-play-plugin.org.playframework.modules.constretto:play-constretto:jar:0.1.1'
<dependency org="com.google.code.maven-play-plugin.org.playframework.modules.constretto" name="play-constretto" rev="0.1.1">
  <artifact name="play-constretto" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.google.code.maven-play-plugin.org.playframework.modules.constretto', module='play-constretto', version='0.1.1')
)
libraryDependencies += "com.google.code.maven-play-plugin.org.playframework.modules.constretto" % "play-constretto" % "0.1.1"
[com.google.code.maven-play-plugin.org.playframework.modules.constretto/play-constretto "0.1.1"]

Dependencies

compile (3)

Group / Artifact Type Version
com.google.guava : guava jar 11.0.1
org.constretto : constretto-api jar 1.1.3
org.constretto : constretto-core jar 1.1.3

provided (1)

Group / Artifact Type Version
com.google.code.maven-play-plugin.org.playframework : play jar 1.2

runtime (6)

Group / Artifact Type Version
org.springframework : spring-core jar 3.0.6.RELEASE
com.google.guava : guava-bootstrap jar 11.0.1
com.ibm.icu : icu4j jar 3.4.4
org.aspectj : aspectjweaver jar 1.6.8
org.ini4j : ini4j jar 0.5.1
org.jasypt : jasypt jar 1.4

Project Modules

There are no modules declared in this project.

Constretto Play Module

This project is not actively maintained. Feel free to fork this repo and continue this effort if you actually need it

  • Integrates the Constretto framework with Play
  • Adds support for using Play's ID mechanism to specify environment.
  • Makes all the properties in "application.conf" available for injection
  • Injection of configuration for controller classes using Constretto's @Configuration annotation
  • The module has been developed and tested with Play 1.2.4

Examples:

public class Application extends Controller {

@Configuration(expression = "example.text")
static String text;

@Configuration(expression = "example.number", defaultValue = "0", required = false)
static Integer number;

...
}

If the configuration expression in the first property is not in found in application.conf, Constretto will throw a ConstrettoException (which is a RuntimeException) .

If you provide a value for the 'defaultValue' property like in the second property that will be used if Constretto can not find a value for the expression in the configuration file.

When you change values for the properties in application.conf and hit reload the Constretto Play modul will automatically re-inject values in to the annotated fields in all your controllers.

Change history

  • v.01 (built 2012-01-25): basic integration with Play controllers done

If you have experience any issues or have change requests for this module, please use the GitHub issue tracker.

Versions

Version
0.1.1