-
Bug
-
Resolution: Done
-
Major
-
1.3.1.Final
-
None
Depending on a how the specific section of configuration file is parsed variable substitution may or may not work.
For some sections (my guess is everything not related to vertx) all configuration values are treated as Strings. Here the substitution works fine, e.g.
"metrics": { "class": "io.apiman.gateway.engine.es.ESMetrics", "config": { "client": { // omitted "port": "${es.port}", } } },
However VertX related configuration is "Typed" and thus the substitution doesn't work, e.g.
"http": { "port": "${apiman.verticles.http.count}", "count": "auto" },
Related java snippet from VertxEngineConfig.java
public JsonObject getVerticleConfig(String verticleType) { return config.getJsonObject(VERTICLES).getJsonObject(verticleType.toLowerCase()); }
After this, the following error message should not be a surprise
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
- relates to
-
APIMAN-1297 Auth section of Vert.X configuration doesn't support env variable substitution
- Resolved