How to use environment variables in light-4j configuration files?

194 Views Asked by At

In light-4j, is there a way to use environment variables in configuration files (like cors.yml, consul.yml, client.yml) similar to docker-compose files?

1

There are 1 best solutions below

0
On

Yes. Take a look at this document

https://doc.networknt.com/concern/config/#environment-external-config-injection

You can use placeholders in the config files and use environment variables or values.yml to overwrite the variables in any config file.