I have some spring config that uses a property, like so:
<bean id="foo" class="...">
<constructor-arg value="${aProperty}"/>
</bean>
Obviously I know I can resolve this property by having a properties file (say example.properties):
aProperty=value
and importing this file in the Spring config:
<bean id="propertyConfiguration" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>example.properties</value>
</list>
</property>
</bean>
My question is, can I set this property directly in the XML file instead of having to create a separate properties file? Something like this would be ideal:
<set-property name="aProperty" value="value"/>
Maven has a similar feature for pom files:
<properties><aProperty>value</aProperty></properies>