Development on Windows 10 with Spring Boot 1.4.2 Release. I just added an environment variable DATABASE_HOST
to my system variables, and I'm trying to read it in mine application.properties
, as shown below:
spring.datasource.url=jdbc:mysql://${DATABASE_HOST}/sampleTable?verifyServerCertificate=false&useSSL=false&requireSSL=false
But after starting the application, jdbc throws an exception. Isn't there a ${xxx}
way to read from system environment variables?
source
share