Skip to content

Instantly share code, notes, and snippets.

@sourcerebels
Created February 8, 2010 09:06
Show Gist options
  • Save sourcerebels/298001 to your computer and use it in GitHub Desktop.
Save sourcerebels/298001 to your computer and use it in GitHub Desktop.
How to load Spring XML configuration file from Java
public class LoadSpringConfig {
public static void main(String[] args) {
String[] configurationFiles = { "path_to_your_spring_xml_configuration_file" };
ApplicationContext ctx = new FileSystemXmlApplicationContext(configurationFiles);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment