I´m trying to use a custom xml as my properties file so I can define some variables on the spring.xml file.
I searched for similar question, but the xml file had to follow a standard to be use.
Normally I would load the .properties files like this:
<bean id="applicationProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="file:///PATH_TO_FILE\file.properties"/>
</bean>
So then I can inject properties to my spring.xml in variables in the form of ${variable}
.
My custom xml looks like this:
<configAttributes>
<attributes>
<attribute>
<name>NameOftheVariable</name>
<description>Text</description>
<value>valueIWantoToInject</value>
</attribute>
<attributes>
I´m using spring-beans 2.5 and Java EE 6.
Thanks.