I'm trying to use environment variable in a application.properties in the Spring Boot, but the static value has some ':' in the middle.
spring.data.mongodb.uri = {$URI:mongodb://user:pass@host.mlab.com:port/db}
But this don't work, i guess it's because
mongodb://user:pass@host.mlab.com:port/db
has ':' in it. I want to use environment variable when available, but if don't use the static configuration, like this works pretty well:
server.port=${PORT:8080}
Do anyone knows how to solve this problem?