Allow @ConstructorBinding to be optional

This commit makes @ConstructorBinding optional for a type
that has a single parameterized constructor. An @Autowired annotation
on any of the constructors indicates that the type should not be constructor
bound.

Since @ConstructorBinding is now deduced for a single parameterized constructor,
the annotation is no longer needed at the type level.

Closes gh-23216
This commit is contained in:
Madhura Bhave
2021-12-10 09:45:48 -08:00
parent bc2c637d63
commit 44b88cc88c
44 changed files with 693 additions and 391 deletions

View File

@@ -27,7 +27,6 @@ import org.springframework.boot.context.properties.bind.DefaultValue;
*
* @author Stephane Nicoll
*/
@ConstructorBinding
@ConfigurationProperties("example")
public class ExampleProperties {