You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -725,7 +725,7 @@ include::code:MyProperties[]
725
725
In this setup, the presence of a single parameterized constructor implies that constructor binding should be used.
726
726
This means that the binder will find a constructor with the parameters that you wish to have bound.
727
727
If your class has multiple constructors, the `@ConstructorBinding` annotation can be used to specify which constructor to use for constructor binding.
728
-
To opt out of constructor binding for a class with a single parameterized constructor, the constructor must be annotated with `@Autowired`.
728
+
To opt out of constructor binding for a class with a single parameterized constructor, the constructor must be annotated with `@Autowired` or made `private`.
729
729
Constructor binding can be used with records.
730
730
Unless your record has multiple constructors, there is no need to use `@ConstructorBinding`.
0 commit comments