This example shows the way to resolve the arguments of the constructor in the spring framework.

Java Code:
package sample;

public class SampleBean {

    private int years; 
    private String description; 

    public ExampleBean(int years, String desc)
    {
         this.years = years;
         this.description= desc;
    }
}
You can resolve by either of these mappings:

1.

Java Code:
<bean id="sampleBean" class="sample.SampleBean">
<constructor-arg type="int"><value>7500000< /value></constructor-arg>
<constructor-arg type="java.lang.String"><value>42</value></constructor-arg>
</bean>
2.

Java Code:
<bean id="exampleBean" class="examples.ExampleBean">
<constructor-arg index="0"><value>7500000</value></constructor-arg>
<constructor-arg index="1"><value>42</value></constructor-arg>
</bean>