support non-lenient constructor injection [SPR-5816] #10486
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Costin Leau opened SPR-5816 and commented
Currently, for constructor injection the container assumes a default type of String for values injected. Consider the following class:
Foo(String s) {}
Foo(Boolean b) {}
<bean class="Foo">
<constructor-arg value="true"/>
</bean>
Currently Spring will pick the first (String) constructor - arguably the second one is also valid. It would be useful to have a flag or some means (even programatically) to change this behaviour so when more then one constructor are found suitable, an exception is raised.
Affects: 3.0 M3
Issue Links:
Referenced from: commits 8e27971, a9254b3
The text was updated successfully, but these errors were encountered: