src/main/java/net/matrix/app/configuration/ConfigurationContext.java
public static ConfigurationContext load(final ResourceRepository repository, final ResourceSelection selection)
		throws ConfigurationException {
		LOG.debug("从 {} 加载配置集合", selection);
		Resource resource = repository.getResource(selection);
		if (resource == null) {
			throw new ConfigurationException(selection + " 解析失败");
		}
		ResourceContextConfig contextConfig = new ResourceContextConfig();
		contextConfig.load(resource);
		return new ConfigurationContext(repository, contextConfig);
	}
public static ConfigurationContext load(final ResourceRepository repository, final ResourceSelection selection)
		throws ConfigurationException {
		LOG.debug("从 {} 加载配置集合", selection);
		Resource resource = repository.getResource(selection);
		if (resource == null) {
			throw new ConfigurationException(selection + " 解析失败");
		}
		ResourceContextConfig contextConfig = new ResourceContextConfig();
		contextConfig.load(resource);
		return new ConfigurationContext(repository, contextConfig);
	}
从资源仓库的某位置加载。

@param repository
资源仓库
@param selection
资源仓库选择
@return 加载环境
@throws ConfigurationException
加载错误