/** * Creates and loads application props. It first loads system properties (registered as <code> * sys.*</code>) and then environment properties (registered as <code>env.*</code>). Finally, * props files are read from the classpath. All properties are loaded using * * <p>If props have been already loaded, does nothing. */ protected void initProps() { if (appProps != null) { return; } appProps = createProps(); appProps.loadSystemProperties("sys"); appProps.loadEnvironment("env"); PropsUtil.loadFromClasspath(appProps, appPropsNamePattern); if (appPropsProfiles != null) { appProps.setActiveProfiles(appPropsProfiles); } }
{ Props props = AliceHelper.getInstance().getJoddProps(); urlPrefix = props.getValue("menu.url.prefix"); }
/** * Creates new Props. Empty props will be ignored, and missing macros will be resolved as empty * string. */ protected Props createProps() { Props props = new Props(); props.setSkipEmptyProps(true); props.setIgnoreMissingMacros(true); return props; }