Integration Server 10.15 | Microservices Runtime Guide | Using Configuration Variables Templates with Microservices Runtime | When Is the Template Applied? | Using Multiple Templates
 
Using Multiple Templates
While you can place all your configuration information in a single template, you may want to separate the configuration information into multiple template files. A single template file for all configuration may become unwieldy and hard to manage. However, a collection of template files may be easier to understand and maintain. For example, each template might focus on a particular configuration area.
To specify multiple template files, set SAG_IS_CONFIG_PROPERTIES to a comma-separated list of files and/or directories. Microservices Runtime applies the files in the same order in which the files are listed. If SAG_IS_CONFIG_PROPERTIES lists a directory, Microservices Runtime process the files within the directory in alphabetical order by file name. After compiling the configuration from all the template files, Microservices Runtime applies the configuration and proceeds with initialization. Once Microservices Runtime starts successfully, you can view the applied configuration values by selecting Microservices > Get Active Configuration Values Template in Microservices Runtime Administrator. The result is an application.properties file that merges all the configuration information specified in the templates.
During template processing, it is possible that more than one file sets the same property value. When this occurs, Microservices Runtime uses the value specified last. Microservices Runtime writes the following message to the configuration variables log:
[ISS.0028.0112I] Application property <propertyName> replaced: old value=<oldValue>, new value=<newValue>
Keep the following information in mind when using multiple configuration variable template files:
*You can specify multiple template files only when using the SAG_IS_CONFIG_PROPERTIES to specify the location of the template.
*You can specify a file name and/or a directory as values of SAG_IS_CONFIG_PROPERTIES.
*Each template file must have the .properties extension. Microservices Runtime ignores files with other extensions.
*Microservices Runtime processes the templates in the order in which the templates are listed for SAG_IS_CONFIG_PROPERTIES. For a directory, Microservices Runtime processes the contents of the directory in ascending alphabetical order by the filename.