ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
# 24.5. 属性占位符 当使用`application.properties`定义的属性时,Spring会先通过已经存在的`Environment`查找该属性,所以你可以引用事先定义的值(比如,系统属性): ```java app.name=MyApp app.description=${app.name} is a Spring Boot application ``` **注** 你也可以使用该技巧为存在的Spring Boot属性创建'短'变量,具体参考[Section 69.4, “Use ‘short’ command line arguments”](https://github.com/cwiki-us-spring-guides/Spring-Boot-Reference-Guide/tree/0047aa8098a650dde0c93f4d2e91754c83468c4b/IX.%20‘How-to’%20guides/63.3.%20Use%20‘short’%20command%20line%20arguments.md)。