What are different types of autowire?



What are different types of autowire?..

Answer / Vishal Ruhela

1. ByName: Autowires a bean by matching the name attribute of the bean.
2. ByType: Autowires a bean based on the type of the dependency.
3. Constructor: Injects dependencies using constructors.
4. autodetect (default): Autowires a bean by trying both ByName and ByType.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Spring Framework Interview Questions

How do you define transactions in spring?

1 Answers  


How to integrate java server faces (jsf) with spring?

1 Answers  


How would you relate the spring mvc framework to mvc architecture?

1 Answers  


What is delegatingvariableresolver?

1 Answers  


Why do we use @override?

1 Answers  


What are the various channels supported by spring 2.0?

1 Answers  


What is dbcontext and dbset?

1 Answers  


What is bean factory?

1 Answers  


Tell us about the spring framework.

1 Answers  


What is spring mvc flow?

1 Answers  


What is servlet initializer in spring boot? : Spring Boot

1 Answers  


What are the important annotations in spring?

1 Answers  


Categories