User guide

Constretto user guide

Work in progress

The Constretto user guide is a work in progress, I will add sections, mostly due to questions asked to me about how it works. Also please feel free to add content here (wink)

Constretto configuration tags.

How to configure

Rules for resolving values

When tags are listed in the -DCONSTRETTO_TAGS system property, the priority is from left to right.
I.e. if a property file (e.g. environment.properties) contains multiple properties that apply for a given set of tags, then the tags in the -DCONSTRETTO_TAGS listing take precedence from left to right.

In addition, when the same property is defined in multiple files, the last file (property) read in will be used.

Summary of property resolving rules when multiple properties can apply:

  tags: left -> right
  overriding of keys: last -> first

How to create your own strategy for configuring tags

Configuration sources

Property files

INI files

Using POJOS as configuration source

Java API

How to instantiate

Using the API

Spring support

Constretto namespace support

Configuration injection

Conditional imports

XML configuration support

Autowiring enhancements

Rules for choosing Spring beans for autowiring

How to create your own strategy for configuring Spring autowire environment