Spring Interview Questions

Beginner

  1. What is Spring Framework and what are important features of Spring Framework?
  2. What are important modules of Spring Framework?
  3. What are Spring Beans?
  4. Object that forms the backbone of the application and managed by Spring IoC container are known as Spring Beans. A spring bean is an object that is instantiated, assembled, and otherwise managed by a Spring IoC container. Beans, and the dependencies among them, are reflected in the configuration metadata used by a container.

  5. What is IoC and how to use it in Spring framework?
  6. What is DI and how to use it in Spring framework?
  7. Difference between the setter and constructor injection in Spring?
  8. What do you understand by auto wiring and name the different modes of it? What are the limitations with auto wiring?
  9. Explain the Spring Bean-LifeCycle.
  10. What is Bean Factory, have you used XMLBeanFactory?
  11. Name some of the Design Patterns used in the Spring Framework and Explain.
  12. Explain Spring MVC
  13. What is the role of DispatcherServlet in Spring MVC?
  14. Differences between @RequestParam and @PathVariable annotations in Spring MVC?
  15. What is IOC or inversion of control?
  16. Explain Dependency Injection
  17. Difference between the setter and constructor injection in Spring?
  18. What do you understand by auto wiring and name the different modes of it?What are the limitations with auto wiring?
  19. Explain the Spring Bean-LifeCycle.
  20. What is Bean Factory, have you used XMLBeanFactory?
  21. Name some of the Design Patterns used in the Spring Framework and Explain.
  22. Explain Spring MVC
  23. What is the role of DispatcherServlet in Spring MVC?
  24. Differences between @RequestParam and @PathVariable annotations in Spring MVC?
  25. What do you understand by auto wiring and name the different modes of it?
  26. What are the limitations with auto wiring?
  27. What’s the difference between @Component, @Controller, @Repository & @Service annotations in Spring?
  28. What do you understand by @Required & @Qualifier annotation?
  29. What is the difference between @Controller and @RestController in Spring MVC?
  30. What is the difference between a singleton and prototype bean?
  31. Does Singleton from Spring Container is thread safe?
  32. Why Spring MVC is better than Struts?
  33. How do you make a Singleton bean to lazy load in ApplicationContext which loads all Singleton beans eagerly during startup?
  34. Which version of Spring have you used recently and what is difference you observed from previous spring version.
  35. Describe the Spring bean lifecycle & Which steps of beans lifecycle can be overridden or controlled?
  36. In the context of Spring, what is a “stereotype”? What are the existing stereotypes and what is the difference between them?
  37. When to use Dependency Injections & When you should not use Dependency Injection?
  38. What is the front controller class of Spring MVC , @Controller ,@RequestMapping.
  39. What does the ViewResolver class?Which ViewResolver class is widely used?
  40. What are the types of the transaction management that is supported by spring?
  41. What are AOP,Advice, Aspect, Join-point and point cut in spring?
  42. What are the different types of AutoProxying & Metadata Autoproxying?
  43. What is ‘Throws advice’ in Spring?
  44. What is cross cutting concern and concern in spring AOP?
  45. How does Spring know where to search for Components or Beans?
  46. What is a component scan?
  47. How do you define a component scan in XML and Java Configurations?
  48. What are the other scopes available?
  49. How is Spring’s singleton bean different from Gang of Four Singleton Pattern?
  50. Difference between the setter and constructor injection in Spring?
  51. How do you choose between XML and Java Configurations for Spring?
  52. What are the different options available to create Application Contexts for Spring?
  53. What are the different kinds of matching used by Spring for Autowiring?
  54. How do you set up Dispatcher Servlet in MVC?
  55. What are the major features in different versions of Spring?
  56. What are new features in Spring Framework 4.0?
  57. What are new features in Spring Framework 5.0?
  58. What is the simplest way of ensuring that we are using single version of all Spring related dependencies?
  59. How is validation done using Spring MVC?
  60. What is a Controller Advice in MVC?
  61. What is @ExceptionHandler in MVC?
  62. How to handle exceptions for web applications?
  63. How do you implement Specific Error Handling for a Spring MVC Controller?
  64. What is an embedded server? Why is it important?
  65. Explain the role of InternalResourceViewResolver and MultipartResolver.
  66. How do you control concurrent Active session using Spring Security?
  67. Why should we go for spring frame work ?
  68. Why to choose spring as struts is there ?
  69. How to declare a Bean and how many ways we can create Bean ?
  70. why we use scope ?
  71. what is Bean scope ?
  72. what type of anotations to be used in spring ?
  73. why we add lazy singelton Beans ?
  74. what is CRON expression ?

Intermediate

  1. Comming soon...

Expert

  1. Comming soon...

Contributors

  • Ashok Kumar Barman
  • Vivek Patel
  • Ishani Vaishnavi
  • Bikash kumar
  • Karan Sahai



 
Footer with Map

Top