From d6be3dfbb0823be7ac694680f6fbb4ca3183b29a Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 18 Mar 2014 11:35:11 -0700 Subject: [PATCH] Add a note on maven filtering This commit adds a documentation note explaining how to change the delimiters used to filter maven tokens as these conflict with the delimiters used by Spring (i.e. ${foo:default}). --- spring-boot-docs/src/main/asciidoc/howto.adoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index 1d880e95aa5..1ee00538be0 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -175,6 +175,12 @@ placeholders in `application.properties`, e.g. server.port=${port:8080} ---- +TIP: If you have enabled maven filtering for the `application.properties` you may want +to avoid using `${*}` for the tokens to filter as it conflicts with those placeholders. +You can either use `@*@` (i.e. `@maven.token@` instead of `${maven.token}`) or you can +configure the `maven-resources-plugin` to use +http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#delimiters[other delimiters]. + NOTE: In this specific case the port binding will work in a PaaS environment like Heroku and Cloud Foundry, since in those two platforms the `PORT` environment variable is set automatically and Spring can bind to capitalized synonyms for `Environment` properties.