public class GrailsPlaceholderConfigurer extends PropertySourcesPlaceholderConfigurer
Uses Grails' ConfigObject for place holder values.
| Fields inherited from class | Fields |
|---|---|
class PropertySourcesPlaceholderConfigurer |
LOCAL_PROPERTIES_PROPERTY_SOURCE_NAME, ENVIRONMENT_PROPERTIES_PROPERTY_SOURCE_NAME, DEFAULT_PLACEHOLDER_PREFIX, DEFAULT_PLACEHOLDER_SUFFIX, DEFAULT_VALUE_SEPARATOR, DEFAULT_ESCAPE_CHARACTER, HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
| Constructor and description |
|---|
GrailsPlaceholderConfigurer(java.lang.String placeHolderPrefix, java.util.Properties properties) |
GrailsPlaceholderConfigurer() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected ConfigurablePropertyResolver |
createPropertyResolver(MutablePropertySources propertySources)Resolves a placeholder that names a list of plain values, such as ${app.names}, to the
elements of the list joined by commas, when neither the environment nor the local properties have
a value under that name. |
|
protected void |
doProcessProperties(ConfigurableListableBeanFactory beanFactoryToProcess, StringValueResolver valueResolver) |
|
public java.util.Properties |
getProperties() |
|
protected void |
loadProperties(java.util.Properties props) |
|
public void |
setBeanFactory(BeanFactory beanFactory) |
|
public void |
setBeanName(java.lang.String beanName) |
|
public void |
setEnvironment(Environment environment) |
|
protected void |
visitMap(java.util.Map<?, ?> mapVal) |
| Methods inherited from class | Name |
|---|---|
class PropertySourcesPlaceholderConfigurer |
equals, getAppliedPropertySources, getClass, getOrder, hashCode, notify, notifyAll, postProcessBeanFactory, setBeanFactory, setBeanName, setEnvironment, setEscapeCharacter, setFileEncoding, setIgnoreResourceNotFound, setIgnoreUnresolvablePlaceholders, setLocalOverride, setLocation, setLocations, setNullValue, setOrder, setPlaceholderPrefix, setPlaceholderSuffix, setProperties, setPropertiesArray, setPropertiesPersister, setPropertySources, setTrimValues, setValueSeparator, toString, wait, wait, wait |
Resolves a placeholder that names a list of plain values, such as ${app.names}, to the
elements of the list joined by commas, when neither the environment nor the local properties have
a value under that name.
The environment presents a configuration list only under its indexed names, such as
app.names[0], so that Spring Boot binds it element by element. The list is read as Spring
Boot binds it, from the property source of the highest priority that sets it, and the placeholders
in its elements are resolved with the rest of the value. The name is matched as
@ConfigurationProperties binding matches it, so ${app.allowedOrigins} and
${app.allowed-origins} read the same list. A list holding objects has no value a
placeholder could be replaced with, so a placeholder naming it is not resolved.
The lists are read only when the environment is one of the configurer's property sources, as it is unless setPropertySources selected others. A configurer given its own sources resolves placeholders from those sources alone, as Spring's does.