I have two constructors:
ctor(String a, String b, char[] c)
ctor(String a, String b, File c)
Now, she I do sth like
<bean id="myBean" class="myClass">
<constructor-arg value="string1" />
<constructor-arg value="string2" />
<constructor-arg value="toCharArray" />
this is resolved using File constructor by spring… any ideas how to stop this?
You can resolve this in adding the type information to the
constructor-argelement using thetypeattribute. See the chapter 4.4.1.1 Constructor-based dependency injection in the Spring documentation for further details.