D
DevPrepSystematic Prep
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

Open Full Easy List
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.jar runnable 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; @EnableAutoConfiguration loads conditionally-defined configurations (@ConditionalOnClass, @ConditionalOnMissingBean).
  • Debug with --debug flag printing the CONDITIONS EVALUATION REPORT (matched/not-matched).
  • Exclude via @SpringBootApplication(exclude=DataSourceAutoConfiguration.class) or property. Your bean ALWAYS wins over auto-config (@ConditionalOnMissingBean backs off) — the key extension principle.

Q3What are starters?
  • Curated dependency descriptors: spring-boot-starter-web pulls 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:

  1. @Configuration — class is a bean-definition source.
  2. @ComponentScan — pick up @Component/@Service/@Repository/@Controller under package (root scan covers sub-packages — why main class sits at root).
  3. @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, @Bean methods, 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
DEDICATED LEVEL PAGES

Browse All Spring Boot Questions by Difficulty

INTERNAL LINKING & DEPENDENCIES

Related Technologies to Spring Boot

CAREER PATHWAYS

Spring Boot is a key requirement for these engineering roles:

Spring Boot Interview Questions — Easy, Medium & Hard | DevPrep | DevPrep