Spring Framework Interview Questions for Experienced Java developers

Neeru K Singh
2 min readFeb 18, 2023

--

  1. What is Spring framework? Why do you use it?
  2. What is dependency injection?
  3. What is Inversion of Control?
  4. What is difference between dependency injection and inversion of control?
  5. What is Spring @Transactional — isolation, propagation ? — click here
  6. What is difference between spring IOC and factory design pattern?
  7. What is the difference between @Configuration and @Component in Spring?
  8. What is spring bean?
  9. What is the default isolation level of @transactional? - REPEATABLE READ
  10. What are different scopes a Spring bean can be?
  11. Does spring bean in Singleton scope are thread-safe?
  12. What is auto wiring?
  13. Does Spring beans are garbage collected in JVM?
  14. Which one is better configuring your application using XML, or Annotations?
  15. What are different types of dependency injection supported by Spring?
  16. What is difference between Constructor and Setter injection?
  17. What is difference between @Contorller, @Service, and @Repository in Spring Framework?
  18. What is difference between Controller and RestController?
  19. What is alternative of Spring for core Java application?
  20. How does JdbcTemplate class helps you?
  21. How do you test Spring Framework application?
  22. How does JmsTemplate class helps you?
  23. What is RestTemplate and WebClient? What are difference between RestClient and WebClient?
  24. What is the current version of Spring framework? Which version have you worked before?
  25. What are the new features introduced in Spring 6.0 version?
  26. Which books you have read about Spring framework?
  27. If you have to change one thing in Spring framework, what do you change?
  28. What are common Spring Framework annotations have you used in your project?
  29. What are annotations? How do you define custom annotations?
  30. What are the features of SpringBoot over spring framework?
  31. What is the difference between @Controller and @RestController?
  32. What happen if we ignore @Service Annotation in a Class?
  33. Explain about @Component, @Service, @Repository, @EnableAutoConfiguration, @EntityScan, @Transient, @Bean?
  34. How to handle Exception in Spring?
  35. How to enable Caching in your Application?
  36. What are the different scopes of Bean?
  37. How to inject a Prototype bean to Singleton bean?
  38. What is the use of Actuator in SpringBoot?
  39. What is your experience with Spring Security? OAuth Authentication?

If you liked the article, please don’t forgot to clap and follow me for more such articles. Please let me know in the comments if you have any suggestion or solution.

Happy Reading !!!

--

--