spring_reference/IV. Spring Boot features/23.5. Placeholders in prope...

562 B
Raw Blame History

23.5. 属性占位符

当application.properties里的值被使用时它们会被存在的Environment过滤所以你能够引用先前定义的值比如系统属性

app.name=MyApp
app.description=${app.name} is a Spring Boot application

你也能使用相应的技巧为存在的Spring Boot属性创建'短'变量,具体参考Section 63.3, “Use short command line arguments”