From e221dfc3a693540e9251241bd0ce76d03a69c48f Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 13 Oct 2015 17:39:31 +0200 Subject: [PATCH] Clarify ConversionService initialization Spring Boot will eagerly initialize a `ConversionService` named `conversionService` for configuration keys processing. This commit adds a note in the documentation regarding that special behaviour. Closes gh-4162 --- spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc | 4 ++++ 1 file changed, 4 insertions(+) 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 2eb4516763..2c31fe5b3d 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -764,6 +764,10 @@ can provide a `ConversionService` bean (with bean id `conversionService`) or cus property editors (via a `CustomEditorConfigurer` bean) or custom `Converters` (with bean definitions annotated as `@ConfigurationPropertiesBinding`). +NOTE: As this bean is requested very early during the application lifecycle, make sure to +limit the dependencies your `ConversionService` is using. Typically, any dependency that +you'd 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. [[boot-features-external-config-validation]]