applicationcontext as properties file
Is it possible to use the applicationContext.xml as a .properties file?
I'd like to have all the configuration in one place and i would like to create some kind of properties bean in the applicationContext. Like so:
PHP Code:
<bean id="myProperties" class="Properties">
<property name="name_1" value="value_1"/>
<property name="name_2" value="value_2"/>
<!-- add your properties here -->
<property name="name_n" value="value_n"/>
</bean>
PropertiesFactoryBean is no good because then i would need an extra config file.
OK - i just realized all i need is a bean with a property of type map, easy-peasy
http://www.java2s.com/Code/Java/Spri...jectionMap.htm