Tuesday, 13 August 2013

Autowiring byName or byType or constructor?

Autowiring byName or byType or constructor?

1)In Spring which autowiring in preferred?I am a beginner in learning
springs so am not getting which ones to use frequently?Is it that the
different types of autowiring have their own advantages and
disadvantages?If yes then what?
2)From Springs in action
eg:
<bean id="saxophone"
class="com.springinaction.springidol.Saxophone"
primary="true" />
And all the others their primary is set false.So i can only use this bean
for autowiring.So what if i need other beans to autowire which are of the
same Instrument type since saxophone is of the Instrument type?

No comments:

Post a Comment