Spring Boot Does not match an environment variable

Development on Windows 10 with Spring Boot 1.4.2 Release. I just added an environment variable DATABASE_HOSTto 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?

+4
source share

Source: https://habr.com/ru/post/1688381/


All Articles