Download the example code and PPT from java9s.com This video explains about the advantages of Spring autowiring. It explains different types of spring Auto wiring like byName, byType and constructor. Auto wiring byName: By using this autowiring- the spring framework checks looks for the properties and checks if any other beans are name with the same name in the xml and if matches then instantiates and injects it into the target bean. Auto wiring byType: By using this autowiring – the spring framework looks the type of the property and checks if there is a bean with the same type if the type matches, it creates the bean and injects it to the target type. Autowiring by Constructor: By using this kind of Autowiring: the spring framework checks each and every argument of the constructor and checks if there is a same type of bean present in the configuration. If present, spring instantiates it and injects it through the constructor.
Spring Framework Tutorial Session 3 Spring Auto Wiring – byType, byName, Constructor
November 29th, 2012 admin
23 Responses to “Spring Framework Tutorial Session 3 Spring Auto Wiring – byType, byName, Constructor”
Leave a Reply
− six = 0