I just start to study Spring and I have a question:
In order to inject a bean, when is it better to use property-based dependency injection:
<bean id="myFirstClass" class="..."> <property name="targetProperty"> <bean id="TheBeanIwantToInject" class="..."/> </property> </bean> instead of constructor-based dependency injection
<bean id="myFirstClass" class="..."> <constructor-arg ref="TheBeanIwantToInject"/> </bean> or it's just two equivalent solutions?