【发布时间】:2016-09-26 12:54:59
【问题描述】:
我在 application.properties 文件中指定了 Spring 属性。如何从环境变量中填充这些属性?
这是我尝试过的,但它似乎不起作用:
application.properties
spring.datasource.url=jdbc:postgresql://#{ systemProperties['DATABASE_HOST']}:5432/dbname
spring.datasource.username = postgres
spring.datasource.password = postgres
【问题讨论】:
标签: java spring spring-boot