DEAR VISITOR , YOU ARE WATCHING : 3 - Spring Auto Wiring - byType, byName, Constructor - Spring Framework Video Tutorial .
[postlink]
https://j2ee-tutorials-videos.blogspot.com/2011/03/3-spring-auto-wiring-bytype-byname.html
[/postlink]
http://www.youtube.com/watch?v=ZlLDHblbZ5kendofvid [starttext]Download the example code and PPT from http://www.java9s.com/spring-framework/spring-3.0/java-spring-auto-wiring.html
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. [endtext]
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. [endtext]
0 commentaires :
Post a Comment