From e541e139a2a3d0f4f59470111555571fdbc23160 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Fri, 13 Feb 2015 09:17:28 +0000 Subject: [PATCH] Add note about Java Bean getters and setters Apparently some users are unclear that setters and getters are mandatory for @ConfigurationProperties. This should clear it up. --- 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 6c46cacc54..42710f3edd 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -529,6 +529,10 @@ the configuration of your application. For example: } ---- +NOTE: The getters and setters are mandatory, since binding is via +standard Java Beans property descriptors, just like in Spring +MVC. Some people use Project Lombok to add them automatically. + When the `@EnableConfigurationProperties` annotation is applied to your `@Configuration`, any beans annotated with `@ConfigurationProperties` will be automatically configured from the `Environment` properties. This style of configuration works particularly well