Interview Questions on Spring IOC

Some of questions on IOC will asked while interviewing candidates. These are as follows:

  1. How to inject list set map properties?

  2. Which approach u prefer xml based or annotation based and why?

  3. What is @configuration meaning?

  4. How to read data from property file?

  5. What is @propertySource annotation?

  6. What is Spring Framework?

  7. Difference between ApplicationContext and BeanFactory.

  8. What are some of the important features and advantages of Spring Framework?

  9. What do you understand by Dependency Injection?

  10. How do we implement DI in Spring Framework?

  11. What is Spring IoC Container?

  12. What is a Spring Bean?

  13. What is the importance of spring bean configuration file?

  14. What are different ways to configure a class as Spring Bean?

  15. What are different scopes of Spring Bean?

  16. What is Spring Bean life cycle?

  17. How to get ServletContext and ServletConfig object in a Spring Bean?

  18. What is Bean wiring and @Autowired annotation?

  19. What are different types of Spring Bean autowiring?

  20. Does Spring Bean provide thread safety?

  21. How to create ApplicationContext in a Java Program?

  22. Can we have multiple spring configuration files?

  23. How to inject a java.util.Properties into a Spring Bean?

  24. Name some of the design patterns used in Spring Framework?

  25. What are some of the best practices for Spring Framework?