public static void loadDefinitions(final ResourcePatternResolver resolver, final String locationPattern) {
		try {
			Resource[] resources = resolver.getResources(locationPattern);
			for (Resource resource : resources) {
				String filename = resource.getFilename();
				Locale locale = Locale.ROOT;
				String filenamePrefix = "codedMessageDefinition_";
				if (filename.startsWith(filenamePrefix)) {
					locale = LocaleUtils.toLocale(filename.substring(filenamePrefix.length(), filename.lastIndexOf(".xml")));
				}
				loadDefinitions(locale, resource);
			}
		} catch (IOException e) {
			LOG.error("加载失败", e);
		}
	}
public static void loadDefinitions(final ResourcePatternResolver resolver, final String locationPattern) {
		try {
			Resource[] resources = resolver.getResources(locationPattern);
			for (Resource resource : resources) {
				String filename = resource.getFilename();
				Locale locale = Locale.ROOT;
				String filenamePrefix = "codedMessageDefinition_";
				if (filename.startsWith(filenamePrefix)) {
					locale = LocaleUtils.toLocale(filename.substring(filenamePrefix.length(), filename.lastIndexOf(".xml")));
				}
				loadDefinitions(locale, resource);
			}
		} catch (IOException e) {
			LOG.error("加载失败", e);
		}
	}
public static void loadDefinitions ( final ResourcePatternResolver resolver , final String locationPattern ) { try { Resource [ ] resources = resolver . getResources ( locationPattern ) ; for ( Resource resource : resources ) { String filename = resource . getFilename ( ) ; Locale locale = Locale . ROOT ; String filenamePrefix = "codedMessageDefinition_" ; if ( filename . startsWith ( filenamePrefix ) ) { locale = LocaleUtils . toLocale ( filename . substring ( filenamePrefix . length ( ) , filename . lastIndexOf ( ".xml" ) ) ) ; } loadDefinitions ( locale , resource ) ; } } catch ( IOException e ) { LOG . error ( "加载失败", e);
 } }
加载所有匹配的配置文件。

@param resolver
资源加载策略
@param locationPattern
匹配模式
加载所有匹配的配置文件。