Map<String, String> componentNamesAndLocations = createTreeMap();
if (componentsConfig.isAutoDiscoverComponents()) {
try {
ResourcePatternResolver resolver = new ServletContextResourcePatternResolver(servletContext);
Resource[] componentConfigurations = resolver.getResources(locationPattern);
Pattern pattern = compilePathName(pathPattern);
if (componentConfigurations != null) {
for (Resource resource : componentConfigurations) {
String path = resource.getURL().getPath();