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/antora/modules/reference/pages/features/external-config.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -746,7 +746,7 @@ include-code::MyProperties[]
746
746
In this setup, the presence of a single parameterized constructor implies that constructor binding should be used.
747
747
This means that the binder will find a constructor with the parameters that you wish to have bound.
748
748
If your class has multiple constructors, the `@ConstructorBinding` annotation can be used to specify which constructor to use for constructor binding.
749
-
To opt out of constructor binding for a class with a single parameterized constructor, the constructor must be annotated with `@Autowired`.
749
+
To opt out of constructor binding for a class with a single parameterized constructor, the constructor must be annotated with `@Autowired` or made `private`.
750
750
Constructor binding can be used with records.
751
751
Unless your record has multiple constructors, there is no need to use `@ConstructorBinding`.
0 commit comments