Spring Boot Quiz
Twenty rapid-fire prompts spanning the TechLearningPRO Spring Boot track.
Introduction
Twenty rapid-fire prompts spanning the TechLearningPRO Spring Boot track. Answer in one or two sentences — the depth a senior interview expects.
Cover Boot 3 annotations, DI, REST, JPA, Security 6, resilience, messaging, and Java 21 virtual threads. No multiple-choice luck; you either know it or revisit the lesson.
Treat this as a closed-book drill, then grade yourself.
Purpose of this lesson
Self-assess Boot 3 / Java 21 mastery with rapid oral-style questions tied to Orders scenarios.
Understanding the topic
Sample question bank (expand to 20 in your notebook).
- What does
@SpringBootApplicationcompose? - Why prefer constructor injection?
- Difference between
@RestControllerand@Controller? - How does
@Transactionalroll back on checked exceptions? - What is the N+1 problem and three ways to fix it?
- Sessions vs JWT — when to pick which?
- What does Resilience4j's circuit breaker actually measure?
- Outbox pattern — what problem does it solve?
- Liveness vs readiness probes?
- Virtual threads — when do they help, when don't they?
- Why disable
open-in-viewin production Orders? - How do you rotate JWT signing keys without downtime?
- Idempotency-Key — where is uniqueness enforced?
- What belongs in Actuator exposure for prod?
- Flyway vs Liquibase — one reason to pick either?
- How does Hibernate dirty checking interact with DTOs?
- Kafka consumer idempotency strategies?
- Bucket4j vs gateway rate limits?
- Problem Details vs ad-hoc error JSON?
- When is package-by-feature worth the migration cost?
Step-by-step explanation
- Answer 20 questions aloud in ≤30 minutes; record yourself.
- Mark each answer strong / shaky / blank.
- Re-read lessons for shaky topics; redo only those questions next day.
- Pair with a peer and swap Orders-flavoured follow-ups.
Informative example
Model answers (abbreviated).
Q: What does @SpringBootApplication compose?A: @Configuration + @EnableAutoConfiguration + @ComponentScan.Q: N+1 fixes?A: join fetch / @EntityGraph, DTO projections/queries, batch size — measure with stats.Q: Virtual threads help when?A: Blocking I/O-bound fan-out on Java 21; not a cure for CPU-bound work or bad SQL.Q: Outbox solves?A: Atomically recording a DB change + event so messaging stays consistent with commits.
Real-world use
Engineers who drill this quiz weekly before on-call rotations answer pager questions faster — especially distinguishing readiness (traffic) from liveness (restart) when Orders pods flap.
Security implications
Quiz yourself on secure defaults too.
- Actuator lockdown beyond health.
- No secrets in repos or quiz notes screenshots.
- CSRF rules for browser vs pure API clients.
Best practices
- Speak in Orders examples, not abstractions only.
- State trade-offs in every Security/JPA answer.
- Keep a miss-list and burn it down.
Common mistakes
- Memorising annotations without knowing failure modes.
- Confusing circuit breaker with retry (they compose differently).
- Claiming virtual threads replace reactive stacks universally.
Advanced interview questions
Interview Prep
Practice concise answers, then expand each card for the explanation.
1BeginnerQuestionHow should you use a quiz like this before interviews?+
Answer
2BeginnerQuestionWhy prefer short spoken answers?+
Answer
3IntermediateQuestionName one Boot 3 migration footgun.+
Answer
Hands-on exercise
Quiz challenge. Score /20 closed-book. For every miss, write a 5-line Orders example that demonstrates the correct answer. Retake in 48 hours aiming for ≥18/20.
Summary
The quiz surfaces gaps across the track. Next: practise full backend interview questions.