${x.y.z} 在哪里为属性文件定义?
Where does ${x.y.z} get defined for the properties file?
在项目中我们有很多.properties 文件。通常他们有诸如
之类的条目
app.sandox.folder=/path/folder
但在其他 .properties 文件中,它们具有
等条目
app.sandbox.folder=${app.sandbox.folder}
我不知道 ${app.sandbox.folder} 的设置位置。任何人都可以为我说明这是什么以及项目声明的位置或文件或它是如何工作的吗?
当您使用 Maven 时,检查这些属性的一个地方是 pom.xml
中的 profiles
。
检查类似
的内容
<app.sandbox.folder> value <app.sandbox.folder/>
或具有这些属性的外部属性文件将在 <configuration>
中定义。
在项目中我们有很多.properties 文件。通常他们有诸如
之类的条目app.sandox.folder=/path/folder
但在其他 .properties 文件中,它们具有
等条目app.sandbox.folder=${app.sandbox.folder}
我不知道 ${app.sandbox.folder} 的设置位置。任何人都可以为我说明这是什么以及项目声明的位置或文件或它是如何工作的吗?
当您使用 Maven 时,检查这些属性的一个地方是 pom.xml
中的 profiles
。
检查类似
的内容<app.sandbox.folder> value <app.sandbox.folder/>
或具有这些属性的外部属性文件将在 <configuration>
中定义。