Published:
Last updated:

Spring Framework

Authors
Time yourself:
Your progress:

00:30:00

0%

Filter by difficulty

47 of 47 questions shown

Spring Core

1. Explain Inversion of Control (IoC) and Dependency Injection (DI)

Mid-level
Flag important question
Mark as complete

2. What are Spring beans, and how do you define them?

Mid-level
Flag important question
Mark as complete

3. What are the different scopes of a Spring bean?

Junior
Flag important question
Mark as complete

4. What is the role of the ApplicationContext?

Junior
Flag important question
Mark as complete

Spring Configuration

5. What is the purpose of the @Configuration annotation?

Junior
Flag important question
Mark as complete

Free preview complete

You’ve reached the end of the free preview

Get every remaining question and complete answer, plus progress tracking across the full Interview Question Library.

  • 42 more questions and complete answers in this topic
  • Full access to every interview topic
  • Progress tracking and question flags
  • New questions and improvements during your subscription

Full access from

$12/month

No long-term commitment. Cancel whenever you want.

6. How do you import properties files in Spring?

Mid-levelPaid Question

7. What are profiles in Spring, and how do you use them?

Mid-levelPaid Question

Spring AOP (Aspect-Oriented Programming)

8. What is AOP, and why is it used in Spring?

JuniorPaid Question

9. What is the difference between @Before, @After, and @Around advice?

Mid-levelPaid Question

10. What are real-world use cases of AOP?

Mid-levelPaid Question

Spring Data Access

11. What is the role of the JdbcTemplate class?

JuniorPaid Question

12. What are Spring's transaction management capabilities?

JuniorPaid Question

13. What is the difference between @Transactional at the method and class levels?

Mid-levelPaid Question

14. How do you integrate Spring with JPA or Hibernate?

Mid-levelPaid Question

15. What are some common transaction isolation types?

JuniorPaid Question

16. What are some common transaction propagation types?

JuniorPaid Question

17. What is the purpose of timeout and readOnly attributes in a transaction?

JuniorPaid Question

18. What is the N+1 query problem in JPA, and how do you solve it?

Mid-levelPaid Question

19. How do you map a one-to-many relationship in JPA?

Mid-levelPaid Question

Spring MVC

20. What is the role of the DispatcherServlet in Spring MVC?

JuniorPaid Question

21. What is the difference between @Controller and @RestController?

Mid-levelPaid Question

22. How do you handle exceptions in Spring MVC?

Mid-levelPaid Question

23. What are interceptors in Spring MVC, and how do you use them?

Mid-levelPaid Question

24. What is the difference between @ResponseBody and @ResponseEntity?

Mid-levelPaid Question

25. How do you validate input in a Spring REST API?

Mid-levelPaid Question

26. How do you use @PathVariable and @RequestParam?

Mid-levelPaid Question

Spring Security

27. What are the steps to set up basic authentication?

Mid-levelPaid Question

28. What is the difference between @PreAuthorize and @Secured?

Mid-levelPaid Question

29. How do you implement custom authentication in Spring Security?

Mid-levelPaid Question

30. How do filters work in the Spring Security filter chain?

Mid-levelPaid Question

31. What is CSRF, and how does Spring Security prevent it?

Mid-levelPaid Question

32. How do you configure JWT in Spring Security?

Mid-levelPaid Question

Spring Testing

33. How do you test Spring MVC controllers?

Mid-levelPaid Question

34. What is the role of the @SpringBootTest annotation?

JuniorPaid Question

35. What is the difference between unit testing and integration testing in Spring?

Mid-levelPaid Question

36. How do you mock dependencies in Spring tests?

Mid-levelPaid Question

Spring Cloud and Microservices

37. How do you implement service discovery using Spring Cloud Netflix Eureka?

Mid-levelPaid Question

38. What is Spring Cloud Config, and how does it work?

Mid-levelPaid Question

39. How do you implement circuit breakers using Spring Cloud?

SeniorPaid Question

40. What is the purpose of Spring Cloud Gateway?

JuniorPaid Question

41. How do you implement rate limiter using Spring Cloud?

Mid-levelPaid Question

Advanced Topics

42. How does the WebClient work in Spring WebFlux?

Mid-levelPaid Question

43. What are other RestTemplate alternatives?

Mid-levelPaid Question

44. How do you enable caching in Spring?

Mid-levelPaid Question

45. What are some strategies for optimizing Spring application performance?

Mid-levelPaid Question

46. What is Spring Boot Actuator used for?

Mid-levelPaid Question

47. What is Spring Batch used for?

Mid-levelPaid Question