How do you configure a Spring bean container (or application context) to load a Java property file?
JavaWorld article Smartly Load Your Properties explains how to load p
The Spring Framework Reference Documentation (2.5.x) gives two examples of how to load a property file into a bean container, one before the release of version 2.5 and a more concise way using the
function that was introduced in version 2.5:
Before version 2.5:
After version 2.5:
Note that in order to use
, you must declare the util
namespace and schema location in the preamble at the top of your Spring XML configuration file: