Interview Prep

Spring Boot Interview Questions

Spring Boot, Spring MVC, dependency injection, request lifecycle, REST APIs, security, observability, and production backend concepts.

Showing 7 of 7 questions

What happens when a request hits a Spring Boot application?

A request enters the embedded servlet container, passes through filters, reaches DispatcherServlet, gets mapped to a controller method, calls application logic, and returns a response.

Spring BootSpring MVCBackendRequest Lifecycle

How does Spring Dependency Injection actually work?

Spring creates and manages objects called beans, figures out what each bean depends on, and injects those dependencies when it creates the bean.

Spring CoreDependency InjectionIoCBeans

What happens during Spring Boot startup?

Spring Boot startup involves creating the application context, scanning beans, processing auto-configuration, wiring dependencies, initializing the embedded server, and preparing the application to serve requests.

Spring BootSpringDependency InjectionBackendArchitecture

How does Spring Boot route HTTP requests to controllers?

Spring MVC uses DispatcherServlet as the central front controller. It receives HTTP requests, asks HandlerMapping which controller method should handle them, uses HandlerAdapter to invoke that method, and then writes the response.

Spring BootSpring MVCDispatcherServletRequest RoutingBackend

JWT Authentication Flow

Understand how JWT (JSON Web Tokens) authentication works in Spring Boot, how bearer tokens are validated, and how claims become authorities.

Spring BootSpring SecurityJWTOAuth2Authentication

Caching in Spring Boot

Learn how Spring caching works with @EnableCaching, @Cacheable, @CacheEvict, @CachePut, cache keys, and distributed cache concerns.

Spring BootCachingRedisPerformanceAnnotations

OAuth2 Resource Server explained simply

A Spring Boot OAuth2 Resource Server is an API that protects endpoints by validating bearer tokens, usually JWTs, and converting token claims into permissions.

SecurityOAuth2JWTSpring Security