Closed sandeepsuvit closed 4 months ago
@sandeepsuvit thanks for reporting the error!
I was able to reproduce and indeed the yaml parser is converting the value to a number so it fails when interpolating the variables.
The fix will be in the next release.
@sandeepsuvit fixed on v1.2.3
.
Note that since we assign the configuration to process.env
the values are converted to string, it is a good idea to use the parse
option if your config attribute is not a string, e.g.:
@Configuration
export class DatabaseConfiguration {
@Value('database.host')
host: string;
@Value('database.port', { parse: parseInt })
port: number;
}
When using
numerical
values in theapplication.yml
file and restarting the application, getting the following errorerror log
When i convert the number to a string like below, its working fine
What is the reason behind the error
value.matchAll is not a function
Note: You need to restart the application to get the above error while using a numerical value