protected FileSystemXmlApplicationContext createContext(Path path, String url) { if (!Paths.hasNamespace(path, SPRING_BEANS_NAMESPACE_URI)) { LOG.info("Ignoring XML file " + path + " which is not a spring XML"); return null; } String[] locations = {url}; if (parentApplicationContext != null) { return new FileSystemXmlApplicationContext(locations, true, parentApplicationContext); } else { return new FileSystemXmlApplicationContext(locations, true); } }