Search This Blog

Thursday, 12 April 2012

The default-autowire attribute

We have seen that Spring supports a variety of auto-wiring options. Spring Container allows us to set a default autowiring for all the beans.
<beans xmlns=""
By default, the default-autowire attribute is set to no. This means that no beans should be auto wired unless they’re individually configured for autowiring with the autowire attribute. We can still override the default on a bean-by-bean basis using the autowire attribute.
<bean id="carByName" class="" autowire="byName"/>

No comments:

Post a Comment