diff --git a/config/alfresco/content-services-context.xml b/config/alfresco/content-services-context.xml
index ee35b6722f..781b59b8e8 100644
--- a/config/alfresco/content-services-context.xml
+++ b/config/alfresco/content-services-context.xml
@@ -145,13 +145,17 @@
-
-
+
+
+
+
+
classpath:alfresco/mimetype/mimetype-map.xml
classpath:alfresco/mimetype/mimetype-map-openoffice.xml
+ classpath*:alfresco/extension/mimetype/*-map.xml
-
+
diff --git a/config/alfresco/extension/mimetype-map-extension-context.xml.sample b/config/alfresco/extension/mimetype-map-extension-context.xml.sample
deleted file mode 100644
index 39d87c8488..0000000000
--- a/config/alfresco/extension/mimetype-map-extension-context.xml.sample
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- classpath:alfresco/mimetype/mimetype-map.xml
- classpath:alfresco/mimetype/mimetype-map-openoffice.xml
- classpath:alfresco/extension/mimetypes-extension.xml
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/config/alfresco/extension/mimetypes-extension.xml.sample b/config/alfresco/extension/mimetype/mimetypes-extension-map.xml.sample
similarity index 100%
rename from config/alfresco/extension/mimetypes-extension.xml.sample
rename to config/alfresco/extension/mimetype/mimetypes-extension-map.xml.sample
diff --git a/source/java/org/alfresco/util/ResourceFinderConfigSource.java b/source/java/org/alfresco/util/ResourceFinderConfigSource.java
new file mode 100644
index 0000000000..372fd5b174
--- /dev/null
+++ b/source/java/org/alfresco/util/ResourceFinderConfigSource.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2005-2012 Alfresco Software Limited.
+ *
+ * This file is part of Alfresco
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ */
+package org.alfresco.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.alfresco.error.AlfrescoRuntimeException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.core.io.Resource;
+import org.springframework.extensions.config.ConfigDeployment;
+import org.springframework.extensions.config.ConfigSource;
+import org.springframework.extensions.config.source.UrlConfigSource;
+
+/**
+ * A Spring {@link ConfigSource} that is powered by a {@link ResourceFinder}.
+ * This allows for the loading of resources with wildcards, which
+ * {@link UrlConfigSource} does not.
+ *
+ * @author Nick Burch
+ * @since 4.0.1
+ */
+public class ResourceFinderConfigSource implements ConfigSource
+{
+ private static Log logger = LogFactory.getLog(ResourceFinderConfigSource.class);
+
+ /** The ResourceFinder to look up with */
+ private ResourceFinder resourceFinder;
+ /** The Resource Paths to search */
+ private List locations;
+
+ public void setResourceFinder(ResourceFinder resourceFinder)
+ {
+ this.resourceFinder = resourceFinder;
+ }
+
+ /**
+ * Sets the locations, of the form classpath*:/some/path.xml
+ */
+ public void setLocations(List locations)
+ {
+ this.locations = locations;
+ }
+
+ @Override
+ public List getConfigDeployments()
+ {
+ List configs = new ArrayList();
+
+ String[] locs = locations.toArray(new String[locations.size()]);
+
+ Resource[] resources;
+ try
+ {
+ resources = resourceFinder.getResources(locs);
+ }
+ catch(IOException e)
+ {
+ throw new AlfrescoRuntimeException("Unable to find resources", e);
+ }
+
+ for (Resource resource : resources)
+ {
+ try
+ {
+ configs.add(new ConfigDeployment(resource.getDescription(), resource.getInputStream()));
+
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("Loaded resource " + resource);
+ }
+ }
+ catch(IOException e)
+ {
+ logger.warn("Skipping unreadable resource " + resource, e);
+ }
+ }
+
+ return configs;
+ }
+}