On a standalone spring application in the main class you can do something like this:
//load the appcontext with refresh value as false
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
new String[] { "classpath:appcontext.xml" }, false);
//add the props file
context.getEnvironment().getPropertySources().addFirst(new ResourcePropertySource("classpath:app.properties"));
//refresh the context
context.refresh();
What this does is to load the spring context with the properties defined in the all the properties which is called inside the appcontext.xml file, but does not refresh at load time. Then it says to load the app.properties as first. At that time only the values in app.properties is considered. And then the context is refreshed. Now the property values in app.properties file is loaded. With this you do not need to rebuild the application, you can just change the values and restart the application