This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
<bean id = "springQuizMaster" class ="com.services.SpringQuizMaster"></bean>
<bean id = "strutsQuizMaster" class = "com.services.StrutsQuizMaster"></bean>
<bean id = "quizMasterService" class = "com.services.QuizMasterService" init-method = "init" destroy-method = "destroy" autowire="byName">
When I use :
<constructor-arg ref="springQuizMaster"/> instead of autowire attribute it runs perfect
but while using autowiring it fails.
Can anyone help me out?
You can't autowire here without more information because there are two beans that go with that constructor. Spring has no way to know which bean you want injected. That's why it works when you use the constructor.