File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
spring-beans/src/main/java/org/springframework/beans/factory Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,8 @@ public interface BeanFactory {
170
170
* Return an instance, which may be shared or independent, of the specified bean.
171
171
* <p>Allows for specifying explicit constructor arguments / factory method arguments,
172
172
* overriding the specified default arguments (if any) in the bean definition.
173
+ * Note that the provided arguments need to match a specific candidate constructor /
174
+ * factory method in the order of declared parameters.
173
175
* @param name the name of the bean to retrieve
174
176
* @param args arguments to use when creating a bean instance using explicit arguments
175
177
* (only applied when creating a new instance as opposed to retrieving an existing one)
@@ -202,6 +204,8 @@ public interface BeanFactory {
202
204
* Return an instance, which may be shared or independent, of the specified bean.
203
205
* <p>Allows for specifying explicit constructor arguments / factory method arguments,
204
206
* overriding the specified default arguments (if any) in the bean definition.
207
+ * Note that the provided arguments need to match a specific candidate constructor /
208
+ * factory method in the order of declared parameters.
205
209
* <p>This method goes into {@link ListableBeanFactory} by-type lookup territory
206
210
* but may also be translated into a conventional by-name lookup based on the name
207
211
* of the given type. For more extensive retrieval operations across sets of beans,
Original file line number Diff line number Diff line change @@ -121,11 +121,7 @@ public ConstructorResolver(AbstractAutowireCapableBeanFactory beanFactory) {
121
121
122
122
/**
123
123
* "autowire constructor" (with constructor arguments by type) behavior.
124
- * Also applied if explicit constructor argument values are specified,
125
- * matching all remaining arguments with beans from the bean factory.
126
- * <p>This corresponds to constructor injection: In this mode, a Spring
127
- * bean factory is able to host components that expect constructor-based
128
- * dependency resolution.
124
+ * Also applied if explicit constructor argument values are specified.
129
125
* @param beanName the name of the bean
130
126
* @param mbd the merged bean definition for the bean
131
127
* @param chosenCtors chosen candidate constructors (or {@code null} if none)
You can’t perform that action at this time.
0 commit comments