Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spring Auto wiring www.java9s.com. Auto wiring Resolves the beans that need to be injected by inspecting the elements in ApplicationContext. www.java9s.com.

Similar presentations


Presentation on theme: "Spring Auto wiring www.java9s.com. Auto wiring Resolves the beans that need to be injected by inspecting the elements in ApplicationContext. www.java9s.com."— Presentation transcript:

1 Spring Auto wiring www.java9s.com

2 Auto wiring Resolves the beans that need to be injected by inspecting the elements in ApplicationContext. www.java9s.com

3 Auto Wiring - Advantages Reduces the configuration for properties and constructor. Automatically gets updated when the configuration change. www.java9s.com

4 Auto Wiring - TYPES NO - default byName byType constructor www.java9s.com

5 byName public class Student { private Book javaBook; } public class Book { private String title; } www.java9s.com

6 byType public class Car { private Wheel wheel; } public class Wheel { private String name; } www.java9s.com

7 constructor public class College { private Student collegeStudent; public College(Student student){ this.collegeStudent = student; } public class Student { private String studentName; } www.java9s.com

8 Auto Wiring – Disadvantages Missing wiring information. Explicit dependency configuration overrides auto wiring. Cannot resolve the beans if multiple beans of same type are configured. www.java9s.com


Download ppt "Spring Auto wiring www.java9s.com. Auto wiring Resolves the beans that need to be injected by inspecting the elements in ApplicationContext. www.java9s.com."

Similar presentations


Ads by Google