I have an application built on the Spring Framework that uses an external properties file for some things, such as the database host string, username and password, so that we can check the configuration file in our repository (this is open source) and not compromise security db. This is also great, because developers can store their own copy of this file, and the application will automatically use the configuration on their system, rather than manually reconfiguring it.
I would like to be able to specify a bean in the same way. We are working with some classes that can change from developer to developer, and it would be great if we could let them specify this information in another file so that they would not have to communicate with the main configuration file.
To give you an idea, we have something like
<property name="url"> <value>${db.host}</value> </property>
Where db.host is listed in another file. We want something like
<bean name="ourBean" class="${class.weneed}" />
The above syntax does not actually work, but demonstrates what we want to do.
Thanks in advance!
Chris
java spring
Chris thompson
source share