Annotation Interface ConstructorBinding


Deprecated, for removal: This API element is subject to removal in a future version.
since 3.0.0 for removal in 3.2.0 in favor of ConstructorBinding
Annotation that can be used to indicate which constructor to use when binding configuration properties using constructor arguments rather than by calling setters. A single parameterized constructor implicitly indicates that constructor binding should be used unless the constructor is annotated with `@Autowired`.

Note: To use constructor binding the class must be enabled using @EnableConfigurationProperties or configuration property scanning. Constructor binding cannot be used with beans that are created by the regular Spring mechanisms (e.g. @Component beans, beans created via @Bean methods or beans loaded using @Import).

Since:
2.2.0
Author:
Phillip Webb
See Also: