https://github.com/zapodot/constretto-play
Play module for to make it easier to integrate the Constretto configuration framework with Play!
https://github.com/zapodot/constretto-play
Last synced: 9 months ago
JSON representation
Play module for to make it easier to integrate the Constretto configuration framework with Play!
- Host: GitHub
- URL: https://github.com/zapodot/constretto-play
- Owner: zapodot
- Created: 2012-01-22T15:53:47.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2015-04-06T16:58:13.000Z (over 11 years ago)
- Last Synced: 2025-06-30T08:06:51.612Z (about 1 year ago)
- Language: Java
- Size: 6.48 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
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](http://constretto.org) 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](https://github.com/zapodot/constretto-play/issues).