Access and use Java Properties in Spring Context file

This seems like such a simple thing to do, and yet finding a nice simple example online was a real bear (A BEAR!!! actually). So here is my example so the next person will have an easier time of it.

Add properties to your properties file:


Load the properties file inside the context file:

<property name=”locations”>

Access properties from the properties file when setting properties of a bean:

<bean id=”searchButtonBean” init-method=”init” class=”javax.swing.JButton”>
<property name=”text”>
<property name=”buttonIcon” value=”${}”/>