本文整理汇总了Java中org.kuali.common.util.PropertyUtils类的典型用法代码示例。如果您正苦于以下问题:Java PropertyUtils类的具体用法?Java PropertyUtils怎么用?Java PropertyUtils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PropertyUtils类属于org.kuali.common.util包,在下文中一共展示了PropertyUtils类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRootConfig
import org.kuali.common.util.PropertyUtils; //导入依赖的package包/类
/**
* Gets the {@link Config} from both the current configuration and the ones in {@code loaded}, at {@code location},
* and in the {@code servletContext}.
*
* @param loaded the loaded properties
* @param location the location of additional properties
* @param servletContext the servlet context in which to add more properties
*
* @return the final configuration
*/
public static Config getRootConfig(Properties loaded, String location, ServletContext servletContext) {
// Get the Rice config object the listener created
Config config = ConfigContext.getCurrentContextConfig();
Preconditions.checkNotNull(config, "'config' cannot be null");
Properties listenerProperties = getProperties(config);
// Parse config from the location indicated, using listener properties in the process of doing so
JAXBConfigImpl parsed = parseConfig(location, listenerProperties);
// Add and override loaded properties with parsed properties
addAndOverride(loaded, parsed.getRawProperties());
// Priority is servlet -> env -> system
// Override anything we've loaded with servlet, env, and system properties
Properties servlet = PropertySources.convert(servletContext);
Properties global = PropertyUtils.getGlobalProperties(servlet);
addAndOverride(loaded, global);
logger.info("Using {} distinct properties", Integer.valueOf(loaded.size()));
// Use JAXBConfigImpl in order to perform Rice's custom placeholder resolution logic now that everything is loaded
return new JAXBConfigImpl(loaded);
}