Commit e541e139 authored by Dave Syer's avatar Dave Syer

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.
parent 28437441
...@@ -529,6 +529,10 @@ the configuration of your application. For example: ...@@ -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`, When the `@EnableConfigurationProperties` annotation is applied to your `@Configuration`,
any beans annotated with `@ConfigurationProperties` will be automatically configured any beans annotated with `@ConfigurationProperties` will be automatically configured
from the `Environment` properties. This style of configuration works particularly well from the `Environment` properties. This style of configuration works particularly well
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment