Since you have suggested hardcoding the path to the configuration file works, try using the profiles attribute on the tag to selectively include the configuration.
See this article explaining profiles: http://java.dzone.com/articles/using-spring-profiles-xml