Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Micronaut application yml placeholder with default value not working

Tags:

micronaut

Micronaut application yml placeholder with default value nor working when value is having ":" in it

Application.yml

report:
   url: ${REPORT_HOST:"http://localhost:8080/"}

Error

Failed to inject value for parameter url Unable to convert value [8080/"] to travel type URI due to illegal character in path at index 5: 8080/

I tried with and without double quotes for value

Micronaut version : 1.0.4

like image 513
Rejith C R Avatar asked Oct 14 '25 14:10

Rejith C R


1 Answers

You need to use back ticks. This is documented here https://docs.micronaut.io/latest/guide/index.html#propertySource

like image 56
Graeme Rocher Avatar answered Oct 17 '25 07:10

Graeme Rocher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!