ContactUs

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

CORE : What is AutoWiring ?

It will inject dependencies automatically without writing  <property /> or <constructor-arg />.If it is constructor then just we need to give  autowire = "constructor"    in the <bean />. If it is setter then autowire="byName".In this case there must be a correct setter method for the property, then only it will inject.

It will resolve all the dependencies.If service java class is expecting 4 dao classes and 4 dao class config details are available in the config file then it will inject all the 4 dao's. If 2 dao's are available then it will inject 2 dao's.

Note: Use autowiring when there are less dependencies. In the maual configuration process we can inject only the required dependent objects.
Related Posts Plugin for WordPress, Blogger...
Flag Counter