我在我的 XML 代码中多次使用它:
${some.value}
some.value 可能来自哪里
- 属性文件
- System.setProperty("some.value", "any_value");
例子:
在春天的情况下,
<bean id="placeholderConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:test.properties" />
</bean>
<bean id="anyID" class="com.my.package.MyClass" >
<constructor-arg index="0" value="${some.value}" />
</bean>
而 test.properties 是,
some.value=any_value
他们叫什么?
它们到底是什么?