Hi all, quick question...

When using a bean definition like so:

<beans>
   <bean id="Logger" class="Log" />

    <bean id="DoCoolStuff" class="DoCoolStuff">
        <property name="Logger">
            <ref bean="Logger"/>
        </property>
    </bean>
</beans>

I found that you can leave out the <cfargument .... type="Log"> in 
DoCoolStuff's setLogger method.

However, when using autowiring:

<beans default-autowire="byName">

    <bean id="Logger" class="Log" />

    <bean id="DoCoolStuff" class="DoCoolStuff" />
    
</beans> 


the <cfargument> can NOT be left out of setLogger() !

I was wondering why this was, so if anyone can shed some light on it please do 
so.

Tnx.

Reply via email to