-
Feature Request
-
Resolution: Done
-
Major
-
None
-
None
Currently DMR can resolve expressions by looking at environment variables:
- if the value is not found in system properties and if the value starts with "env."
This makes it impossible to have an expression being resolved from either a sys prop or an env var (unless the sys prop name is appended with "env." which is too confusing).
This RFE proposes to enhance DMR expression resolver by looking for env variables if the system property is not found (without required a "env." prefix).
The new algorithm in https://github.com/jbossas/jboss-dmr/blob/c17dae88ae1f03c86b8be6c6c4e06fdc23f4b067/src/main/java/org/jboss/dmr/ValueExpressionResolver.java#L191 would be
protected String resolvePart(String name) {$ ... // First check for system property String val = System.getProperty(name); // then for env variable without the env. prefix if (val == null) val = System.getenv(name); // then for env variable with the env. prefix (for backwards compatibility) if (val == null && name.startsWith("env.")) val = System.getenv(name.substring(4)); return val; }
- blocks
-
WFCORE-5464 Add environment variables as a source for model expression resolution
- Closed
- relates to
-
ELY-2389 Consistent expression resolution with WildFly
- Resolved