...
The command above generates GlobalConfigurationPathResolver with ALL properties from global configuration file if it has YAML-format.
If you don't need all properties to be included in GlobalConfigurationPathResolver, you can list only required the highest level properties to include. For this separate them with comma (no spaces, just comma!).
For example, if you has the following configuration file
Code Block |
---|
language | yml |
---|
title | application.yml |
---|
|
googleAuth:
companyName: "Knubisoft.com"
geoLite2:
enabled: false
name: "GEOLITE2"
delaysTracking:
api-duration: 5000ms
dao-duration: 5000ms
service-duration: 5000ms |
and you need to generate paths only for properties companyName and api-duration to change their values via tag <configuration>, you should run the following command from the project root directory:
Code Block |
---|
|
cmd/run generate cfg-with-resolver googleAuth,delaysTracking |
You can also specify values to exclude from generation considering that all properties's paths will be generated. For that use the flag '-e' or '--exclude' and list required separated with comma the highest level properties to exclude. E.g.
Code Block |
---|
|
cmd/run generate cfg-with-resolver -e geoLite2 |
Code Block |
---|
|
cmd/run generate cfg-with-resolver --exclude geoLite2 |
NOTE: After test completion all changed properties' values are reverted to their values before changing via tag <configuration> (values which were stated in configuration file).
...