From f4c1efd12809413487aecf497de66e762989c028 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 13 Oct 2015 11:41:23 +0200 Subject: [PATCH] Clarify property expansion So far we have wrongly advertized that the `spring-boot-starter-parent` filters application configuration in such a way that standard Spring placeholders are not processed. In order to achieve such feature, the `useDefaultDelimiters` property must be set to `false` as otherwise default delimiters are appended to the list of custom delimiters. This property is not enabled so that only keys surrounded by `@` are filtered by the build. Closes gh-3092 --- .../src/main/asciidoc/production-ready-features.adoc | 7 ++++--- spring-boot-starters/spring-boot-starter-parent/pom.xml | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index 67536f4ace..881642eaac 100644 --- a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -363,9 +363,6 @@ Maven '`project properties`' via `@..@` placeholders, e.g. info.build.version=@project.version@ ---- -NOTE: In the above example we used `+project.*+` to set some values to be used as -fallbacks if the Maven resource filtering has not been switched on for some reason. - TIP: The `spring-boot:run` maven goal adds `src/main/resources` directly to the classpath (for hot reloading purposes). This circumvents the resource filtering and this feature. You can use the `exec:java` goal instead or customize the plugin's configuration, see the @@ -396,10 +393,14 @@ and (inside ``): @ + false ---- +NOTE: The `useDefaultDelimiters` property is important if you are using standard +Spring placeholders in your configuration (e.g. `${foo}`). These may be expanded +by the build if that property is not set to `false`. [[production-ready-application-info-automatic-expansion-gradle]] diff --git a/spring-boot-starters/spring-boot-starter-parent/pom.xml b/spring-boot-starters/spring-boot-starter-parent/pom.xml index 820a465e83..667cc3da78 100644 --- a/spring-boot-starters/spring-boot-starter-parent/pom.xml +++ b/spring-boot-starters/spring-boot-starter-parent/pom.xml @@ -114,6 +114,7 @@ ${resource.delimiter} + false