DEVPREP CODEX · #23
Spring Boot Interview Questions
150 curated questions graded from Foundations (Easy) to Practical Patterns (Medium) and Internals & Architecture (Hard).
TOTAL QUESTIONS
150
THEORY QUESTIONS
150
IMPLEMENTATION FOLIOS
0
FREE QUESTIONS
5 / Level
Easy Level·50 Questions Total
Foundations & Core Concepts
Q1What is Spring Boot and how does it differ from plain Spring?
- Opinionated framework removing Spring's configuration burden: auto-configuration, starter dependencies, embedded servers (Tomcat/Jetty), production features (Actuator).
- Plain Spring requires explicit XML/Java config for every bean; Boot infers from classpath ("found H2 + JPA → configure datasource").
- Result:
java -jar app.jarrunnable microservice in minutes vs days of wiring.
Q2What is auto-configuration and how do you debug or disable it?
- Boot inspects classpath, beans, properties at startup;
@EnableAutoConfigurationloads conditionally-defined configurations (@ConditionalOnClass,@ConditionalOnMissingBean). - Debug with
--debugflag printing the CONDITIONS EVALUATION REPORT (matched/not-matched). - Exclude via
@SpringBootApplication(exclude=DataSourceAutoConfiguration.class)or property. Your bean ALWAYS wins over auto-config (@ConditionalOnMissingBeanbacks off) — the key extension principle.
Q3What are starters?
- Curated dependency descriptors:
spring-boot-starter-webpulls Spring MVC+Jackson+Tomcat coherently versioned. - Kill transitive-dependency guesswork; Boot's BOM manages compatible versions across the ecosystem.
- Common set to name: web, data-jpa, security, validation, actuator, test, data-redis.
Q4Walk through @SpringBootApplication annotations.
Composite of three:
@Configuration— class is a bean-definition source.@ComponentScan— pick up@Component/@Service/@Repository/@Controllerunder package (root scan covers sub-packages — why main class sits at root).@EnableAutoConfiguration— activates conditional config machinery.
Q5What is the IoC container / ApplicationContext?
- Inversion of Control: the framework creates and wires objects (beans) instead of classes instantiating their own dependencies.
- ApplicationContext is the advanced container — lifecycle callbacks, events, i18n, resource loading on top of bean factory.
- Beans defined via stereotype annotations,
@Beanmethods, or imports; retrieved by type mostly — coding to interfaces becomes natural.
45 More Easy Questions Locked
Unlock the complete Spring Boot Easy question bank
Get instant access to all 50 questions, in-depth model answers, code sandboxes, and all 27+ technologies for a single one-time payment.
Unlock All — One-time payment · Lifetime access
Browse All Spring Boot Questions by Difficulty
Easy50 Questions
Core concepts, definitions, basic syntax, and first principles expected in round 1 screening.
VIEW FULL LIST
Medium50 Questions
Real-world mechanisms, state management, edge cases, performance trade-offs, and practical coding.
VIEW FULL LIST
Hard50 Questions
Deep runtime internals, memory models, distributed design, concurrency failure modes, and architectural decisions.
VIEW FULL LIST
INTERNAL LINKING & DEPENDENCIES