Learning path · 18 lessons · 2 topics
🌱 Spring & Spring Boot interview preparation
IoC, dependency injection, auto-configuration, data access, security and testing.
Spring Boot interviews check whether you understand what the framework does for you: how beans are created and wired, how auto-configuration decides what to set up, how transactions and proxies work, and how you test and secure a service.
Begin with the Spring container and dependency injection, then Spring Boot itself, and finish with production concerns such as profiles, actuator, transactions and security.
What you will learn
- Bean lifecycle, scopes and dependency injection
- Auto-configuration, starters, profiles and externalised config
- @Transactional, proxies and JPA pitfalls (N+1, lazy loading)
- Testing slices, Actuator and Spring Security basics
Topics
Roadmap: beginner to advanced
-
1
Intermediate Intermediate stage
Working knowledge: how things behave in real projects and the trade-offs you make.
Spring
- Explain IoC and dependency injection in Spring. How does Spring decide which bean to inject?
- Explain Spring bean scopes. How do you inject a prototype bean into a singleton? Are singletons thread-safe?
- What happens when an HTTP request reaches a Spring MVC application?
- How do Spring application events and @Async work, and what are the pitfalls?
- How do you implement caching with Spring, and how do you keep the cache consistent?
Spring Boot
- How does externalised configuration work in Spring Boot? @ConfigurationProperties vs @Value?
- How do you design global exception handling and validation in a Spring Boot REST API?
- How do you make a Spring Boot service production-ready with Actuator and observability?
- How do you test a Spring Boot application effectively?
-
2
Advanced Advanced stage
Senior depth: internals, scale, failure modes and design decisions.
Spring
- Walk through the Spring bean lifecycle.
- How does Spring AOP work? Explain JDK dynamic proxies vs CGLIB and the self-invocation problem.
- How does @Transactional work? Explain propagation, isolation, rollback rules and the common pitfalls.
Spring Boot
- How does Spring Boot auto-configuration work? How would you write a custom starter?
- What happens when SpringApplication.run() executes, and how do you speed up startup?
- What is the N+1 query problem in JPA, and how do you tune Hibernate performance?
- How do you prevent lost updates? Explain optimistic vs pessimistic locking in JPA.
- Explain Spring Security's architecture and how you secure a REST API with JWT.
- How would you make a Spring Boot service handle high throughput and low latency?