/** * Resolve ${...} placeholders in the given text, replacing them with corresponding * servlet context init parameter or system property values. Unresolvable placeholders * with no default value are ignored and passed through unchanged if the flag is set to true. * @param text the String to resolve * @param servletContext the servletContext to use for lookups. * @param ignoreUnresolvablePlaceholders flag to determine is unresolved placeholders are ignored * @return the resolved String * @see SystemPropertyUtils#PLACEHOLDER_PREFIX * @see SystemPropertyUtils#PLACEHOLDER_SUFFIX * @see SystemPropertyUtils#resolvePlaceholders(String, boolean) * @throws IllegalArgumentException if there is an unresolvable placeholder and the flag is false */ public static String resolvePlaceholders(String text, ServletContext servletContext, boolean ignoreUnresolvablePlaceholders) { PropertyPlaceholderHelper helper = (ignoreUnresolvablePlaceholders ? nonStrictHelper : strictHelper); return helper.replacePlaceholders(text, new ServletContextPlaceholderResolver(text, servletContext)); }
/** * Resolve ${...} placeholders in the given text, replacing them with corresponding * servlet context init parameter or system property values. Unresolvable placeholders * with no default value are ignored and passed through unchanged if the flag is set to true. * @param text the String to resolve * @param servletContext the servletContext to use for lookups. * @param ignoreUnresolvablePlaceholders flag to determine is unresolved placeholders are ignored * @return the resolved String * @throws IllegalArgumentException if there is an unresolvable placeholder and the flag is false * @see SystemPropertyUtils#PLACEHOLDER_PREFIX * @see SystemPropertyUtils#PLACEHOLDER_SUFFIX * @see SystemPropertyUtils#resolvePlaceholders(String, boolean) */ public static String resolvePlaceholders(String text, ServletContext servletContext, boolean ignoreUnresolvablePlaceholders) { PropertyPlaceholderHelper helper = (ignoreUnresolvablePlaceholders ? nonStrictHelper : strictHelper); return helper.replacePlaceholders(text, new ServletContextPlaceholderResolver(text, servletContext)); }
/** * Resolve ${...} placeholders in the given text, replacing them with corresponding * servlet context init parameter or system property values. Unresolvable placeholders * with no default value are ignored and passed through unchanged if the flag is set to true. * @param text the String to resolve * @param servletContext the servletContext to use for lookups. * @param ignoreUnresolvablePlaceholders flag to determine is unresolved placeholders are ignored * @return the resolved String * @throws IllegalArgumentException if there is an unresolvable placeholder and the flag is false * @see SystemPropertyUtils#PLACEHOLDER_PREFIX * @see SystemPropertyUtils#PLACEHOLDER_SUFFIX * @see SystemPropertyUtils#resolvePlaceholders(String, boolean) */ public static String resolvePlaceholders(String text, ServletContext servletContext, boolean ignoreUnresolvablePlaceholders) { PropertyPlaceholderHelper helper = (ignoreUnresolvablePlaceholders ? nonStrictHelper : strictHelper); return helper.replacePlaceholders(text, new ServletContextPlaceholderResolver(text, servletContext)); }
/** * Resolve ${...} placeholders in the given text, replacing them with corresponding * servlet context init parameter or system property values. Unresolvable placeholders * with no default value are ignored and passed through unchanged if the flag is set to true. * @param text the String to resolve * @param servletContext the servletContext to use for lookups. * @param ignoreUnresolvablePlaceholders flag to determine is unresolved placeholders are ignored * @return the resolved String * @throws IllegalArgumentException if there is an unresolvable placeholder and the flag is false * @see SystemPropertyUtils#PLACEHOLDER_PREFIX * @see SystemPropertyUtils#PLACEHOLDER_SUFFIX * @see SystemPropertyUtils#resolvePlaceholders(String, boolean) */ public static String resolvePlaceholders(String text, ServletContext servletContext, boolean ignoreUnresolvablePlaceholders) { PropertyPlaceholderHelper helper = (ignoreUnresolvablePlaceholders ? nonStrictHelper : strictHelper); return helper.replacePlaceholders(text, new ServletContextPlaceholderResolver(text, servletContext)); }