From 77190f126a284bfffd616c214c3debeec7517f2d Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 27 Nov 2015 11:42:23 +0100 Subject: [PATCH] Create dedicated section for property conversion See gh-4604 --- .../src/main/asciidoc/spring-boot-features.adoc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 708656c1a4..13c9f8fd25 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -794,6 +794,10 @@ The following properties names can all be used: |Upper case format. Recommended when using a system environment variables. |=== + + +[[boot-features-external-config-conversion]] +==== Properties conversion Spring will attempt to coerce the external application properties to the right type when it binds to the `@ConfigurationProperties` beans. If you need custom type conversion you can provide a `ConversionService` bean (with bean id `conversionService`) or custom @@ -803,7 +807,8 @@ bean definitions annotated as `@ConfigurationPropertiesBinding`). NOTE: As this bean is requested very early during the application lifecycle, make sure to limit the dependencies that your `ConversionService` is using. Typically, any dependency that you require may not be fully initialized at creation time. You may want to rename -your custom `ConversionService` if it's not required for configuration keys coercion. +your custom `ConversionService` if it's not required for configuration keys coercion and +only rely on custom converters qualified with `@ConfigurationPropertiesBinding`.