Browse Source

Polish reference manual regarding placeholders

pull/35405/head
Sam Brannen 7 months ago
parent
commit
457e876303
  1. 7
      framework-docs/modules/ROOT/pages/core/beans/factory-extension.adoc
  2. 2
      framework-docs/modules/ROOT/pages/languages/kotlin/spring-projects-in.adoc
  3. 4
      framework-docs/modules/ROOT/pages/web/webflux/controller/ann-requestmapping.adoc

7
framework-docs/modules/ROOT/pages/core/beans/factory-extension.adoc

@ -342,7 +342,7 @@ with placeholder values is defined: @@ -342,7 +342,7 @@ with placeholder values is defined:
The example shows properties configured from an external `Properties` file. At runtime,
a `PropertySourcesPlaceholderConfigurer` is applied to the metadata that replaces some
properties of the DataSource. The values to replace are specified as placeholders of the
form pass:q[`${property-name}`], which follows the Ant and log4j and JSP EL style.
form pass:q[`${property-name}`], which follows the Ant, log4j, and JSP EL style.
The actual values come from another file in the standard Java `Properties` format:
@ -357,9 +357,10 @@ jdbc.password=root @@ -357,9 +357,10 @@ jdbc.password=root
Therefore, the `${jdbc.username}` string is replaced at runtime with the value, 'sa', and
the same applies for other placeholder values that match keys in the properties file.
The `PropertySourcesPlaceholderConfigurer` checks for placeholders in most properties and
attributes of a bean definition. Furthermore, you can customize the placeholder prefix and suffix.
attributes of a bean definition. Furthermore, you can customize the placeholder prefix, suffix,
default value separator, and escape character.
With the `context` namespace introduced in Spring 2.5, you can configure property placeholders
With the `context` namespace, you can configure property placeholders
with a dedicated configuration element. You can provide one or more locations as a
comma-separated list in the `location` attribute, as the following example shows:

2
framework-docs/modules/ROOT/pages/languages/kotlin/spring-projects-in.adoc

@ -190,7 +190,7 @@ NOTE: If you use Spring Boot, you should probably use @@ -190,7 +190,7 @@ NOTE: If you use Spring Boot, you should probably use
instead of `@Value` annotations.
As an alternative, you can customize the property placeholder prefix by declaring the
following configuration beans:
following configuration bean:
[source,kotlin,indent=0]
----

4
framework-docs/modules/ROOT/pages/web/webflux/controller/ann-requestmapping.adoc

@ -234,8 +234,8 @@ Kotlin:: @@ -234,8 +234,8 @@ Kotlin::
--
URI path patterns can also have embedded `${...}` placeholders that are resolved on startup
through `PropertySourcesPlaceholderConfigurer` against local, system, environment, and
other property sources. You can use this to, for example, parameterize a base URL based on
by using `PropertySourcesPlaceholderConfigurer` against local, system, environment, and
other property sources. You can use this, for example, to parameterize a base URL based on
some external configuration.
NOTE: Spring WebFlux uses `PathPattern` and the `PathPatternParser` for URI path matching support.

Loading…
Cancel
Save