Details
-
Improvement
-
Resolution: Won't Do
-
Neutral
-
None
-
6.2
Description
Add the possibility to substitute or interpolate environment/magnolia properties. Specify placeholders in yaml definitions/decorations which will be parsed before loading them, so developers can refer to variables specified in e.g. magnolia.properties or environment variables. Configuration per environment/profile is very common and used in frameworks like spring.
Use case:
A rest-client definition has the same yaml definition, but only the baseUrl or a timeout setting is different.
Example configuration:
database:
host: ${DB_HOST:-localhost}
user: ${DB_USER:-defaultuser}
password: ${DB_PASSWORD}
The DB_HOST will be replaced using the MagnoliaConfiguration class which will lookup the value from the layers of property sources (magnolia.properties, environment variables, etc..)
Workaround
Different configurations possible for different environments
Checklists
Attachments
Issue Links
- is related to
-
MAGNOLIA-7883 Enable different configuration for different environments
-
- Closed
-