Spring Boot Fundamentals
Learn Spring Boot from scratch with 1,500+ free practice MCQs — IoC and DI, beans, auto-configuration, REST controllers, Spring Data JPA, exception handling, configuration, and testing. Instant explanations after every wrong answer. About 17 hours of focused practice.
What you'll learn
- Trace the Spring Framework history from XML configuration through Java configuration to Spring Boot — and explain why Spring Boot is the default JVM backend stack today.
- Apply Inversion of Control and the three DI types (constructor, setter, field) — and recognise the cases where each is the right choice in a real codebase.
- Manage Spring beans deliberately — bean basics, configuration (Java config vs annotation scan), the full bean lifecycle, and the five scopes (singleton, prototype, request, session, application).
- Read Spring Boot auto-configuration without surprise — how conditional beans work, what each starter actually pulls in, and how the embedded server (Tomcat, Jetty, Undertow) starts up.
- Build REST controllers idiomatically — @RestController, @GetMapping / @PostMapping / @PutMapping, ResponseEntity for status and headers, and Jackson serialization customisation.
- Bind and validate request data — @RequestBody, @RequestParam, @PathVariable, multipart uploads, content negotiation, and Bean Validation (JSR-380) with custom validators.
- Use Spring Data JPA fluently — entity mapping (@Entity, @OneToMany, fetch strategies), repository interfaces (CrudRepository, JpaRepository, derived queries), and transaction management with @Transactional.
- Design exception handling that scales — @ExceptionHandler, @ControllerAdvice for global handlers, Problem Details (RFC 7807) error responses, and the trade-offs of Spring Boot default error handling.
- Configure Spring Boot applications cleanly — application.properties vs YAML, profiles for environment-specific config, @Value vs @ConfigurationProperties, and externalised configuration patterns.
- Test Spring Boot applications properly — slice tests with @WebMvcTest / @DataJpaTest, MockMvc for controller-layer assertions, and @SpringBootTest for integration coverage.
- Make Spring Boot decisions under interview and code-review pressure — concept comparisons, pattern selection (which annotation, which scope, which test slice), and Spring Boot in real production code.
Curriculum
- history of Spring Framework
- Spring Boot origin and goals
- Spring vs Spring Boot
- Spring Boot version evolution
- Spring ecosystem overview
- convention over configuration
- embedded server concept
- starter dependencies
- production-ready features
- Spring Boot vs traditional Java EE
About this course
Spring Boot Fundamentals is a free practice course on Abekus built around 1,500+ MCQs covering the entire Spring Boot stack — the Inversion of Control container, dependency injection, beans and the application context, auto-configuration and starters, the embedded server, REST controllers, Spring Data JPA, exception handling, externalised configuration, and testing. The framework most Java backend roles run on.
The format is one question at a time with an explanation that fires the moment you click a wrong answer. No videos, no skimming the Spring reference manual — retrieval practice on the pattern-selection and trap questions interviewers ask and production bugs come from. You will predict which bean wins under conditional auto-configuration, recognise the difference between @Component scoped as singleton vs prototype, and trace what @Transactional actually does at the proxy boundary.
Quick facts
- Format — 1,500+ free MCQs with instant explanations after every wrong answer.
- Duration — about 17.4 hours of focused practice; most learners finish over 4–5 weeks at 45–60 minutes a day.
- Level — intermediate. Assumes working Java (classes, generics, exceptions, Collections). No prior Spring experience required.
- Cost — free, with a free completion certificate.
- Audience — Java developers picking up Spring for a backend role, candidates preparing for product-company Spring Boot interviews, working Java engineers formalising knowledge they have been picking up by osmosis, and engineering students prepping for placements at Spring-shop companies.
- Recommended before this — Java Fundamentals (covers the language ground this course assumes).
- Companion course — Spring Boot: Security & Advanced for Spring Security, the senior-engineer Spring patterns, and the production-readiness story.
Who is this Spring Boot course for?
Four audiences specifically. First, Java developers picking Spring up for a new backend role — the engineers who can write a Java class but have never run ./mvnw spring-boot:run and need the framework model in their head before they can be productive. Second, candidates preparing for product-company backend interviews where Spring Boot is the assumed stack — questions like "what does @Transactional actually do", "how does Spring resolve bean dependencies", "explain auto-configuration" come up verbatim. Third, working Java engineers who have been picking up Spring by osmosis for years but want to formalise the bits they have been guessing at — bean scopes, the exact proxy mechanics, the auto-configuration order. Fourth, engineering students prepping for placements where the chosen company runs on Spring.
This course assumes Java fluency. If you cannot yet read a 20-line Java class with generics, exceptions, and collections, work through Java Fundamentals first. The first topic introduces Spring concepts from scratch, but the snippets from Topic 2 onwards expect comfort reading idiomatic Java.
What you'll learn in this Spring Boot course
Foundations — the container and beans
- Introduction to Spring Boot — Spring Framework history (XML → Java config → Spring Boot), and why Spring Boot is the default JVM backend stack today.
- Inversion of Control & Dependency Injection — the IoC concept, the three DI types (constructor, setter, field), and DI in practice (when each is right, why constructor injection is the default recommendation).
- Spring Beans & Application Context — bean basics, bean configuration (Java config vs component scan), the full bean lifecycle (instantiation → DI → init callbacks → use → destruction), and the five scopes (singleton, prototype, request, session, application).
The web stack — auto-config, controllers, and data
- Spring Boot Auto-configuration & Starters — how @ConditionalOnClass and friends decide what configures itself, what each starter (web, data-jpa, security, actuator) actually pulls in, and the embedded server (Tomcat, Jetty, Undertow) startup.
- Spring MVC & REST Controllers — @RestController vs @Controller, request-mapping annotations, ResponseEntity for status and headers, Jackson serialization (custom serializers, mixins, view annotations).
- Request Handling & Validation — data binding (@RequestBody, @RequestParam, @PathVariable), Bean Validation (JSR-380) with @Valid and custom constraints, multipart uploads and content-type negotiation.
- Spring Data JPA — entity mapping (@Entity, @OneToMany with fetch and cascade strategies), Spring Data repositories (CrudRepository, JpaRepository, derived queries, @Query), transaction management (@Transactional propagation and isolation).
Production-readiness — errors, config, testing
- Exception Handling & Error Responses — @ExceptionHandler, @ControllerAdvice for global handlers, Problem Details (RFC 7807), and the trade-offs of Spring's default error handling.
- Spring Boot Configuration — application.properties vs YAML, Spring Profiles for environment-specific config, @Value vs @ConfigurationProperties, externalised configuration via environment variables, command-line args, and config servers.
- Testing in Spring Boot — unit tests with mocked dependencies, slice tests (@WebMvcTest, @DataJpaTest, @JsonTest), MockMvc for controller-layer assertions, @SpringBootTest for full integration tests, Testcontainers for real-database integration.
- Spring Boot Fundamentals in Practice — concept comparisons (@Component vs @Bean; constructor vs field injection; @Transactional propagation modes), pattern selection (which annotation, which scope, which test slice), and Spring Boot in real production code.
Constructor injection vs field injection — which to use
The single most-asked Spring DI question and one this course gives you a real answer to. Constructor injection is the Spring-team recommendation since 4.3 — required dependencies are visible in the signature, the class is immutable after construction, the bean is testable without Spring (you can new it with mocks), and circular dependencies fail loudly at startup rather than silently at runtime. Field injection (@Autowired on a private field) is shorter to write but hides dependencies, defeats final fields, makes testing without Spring painful, and lets circular dependencies through that constructor injection would catch.
The course works through this with code-review-flavoured MCQs (this class has 8 field-injected dependencies — what's wrong with it?), pattern questions (rewrite this field-injected service for constructor injection), and trap questions (this circular-dependency setup works with field injection but is a code smell — why). The DI Types and Spring Boot in Practice topics drill these patterns until pattern selection is reflex.
What's the best way to learn Spring Boot?
Active recall on real Spring code, not skimming the reference manual. Most working Spring developers know @Autowired and @RestController but stumble on the depth questions — when @Transactional doesn't actually start a transaction (self-invocation defeats the proxy), how auto-configuration order resolves conflicts, what the difference between @Component-scoped-as-prototype and a new() call actually is, why @RequestParam(required=false) Integer becomes null but int becomes a 400. MCQ practice forces production every question.
Spacing matters too. 45–60 minutes a day for 4–5 weeks beats one cram weekend, because Spring Boot has enough small rules (bean lifecycle callbacks, proxy mechanics, transaction propagation modes, conditional auto-configuration) that each one only sticks after multiple rephrasings.
How MCQ-based Spring Boot practice works on Abekus
One question at a time. You read a snippet (often a 10–20 line @RestController, @Service, or @Configuration class), pick the option matching the runtime behaviour, the resolved bean, the transaction outcome, or the thrown exception, and submit. Wrong answers trigger an explanation that walks through the actual mechanic — the proxy that swallowed the self-invocation, the @ConditionalOnMissingBean that excluded a starter, the JPA fetch strategy that triggered an N+1, the @Transactional propagation that rolled back unexpectedly.
The Abekus AI guide watches which topics you keep getting wrong and surfaces them more often. If you nail beans and DI but keep mis-predicting Spring Data JPA transactions, the next session leans on transactions. The certificate is gated on completing every top-level topic, so the depth signal is honest.
How long this course actually takes
Plan on roughly 17.4 hours of focused practice. The math: 1,567 active questions × ~40 seconds per question (reading the snippet, picking an answer, skimming the explanation when wrong) = ~1,045 minutes = ~17.4 hours.
Most learners spread that across 4–5 weeks at 45–60 minutes a day. Some compress it into a long weekend before an interview; that works for refresh mode but retention is weaker. Trust the spacing — proxy mechanics, transaction propagation modes, and JPA fetch behaviour only stick after the same trap has been rephrased multiple ways.
What to take alongside or after this course
This course assumes Java Fundamentals. Java Collections Mastery helps for the JPA topic (entity collections, fetch strategies, Map-based caches). Java Concurrency & Multithreading helps for understanding how Spring's request-handling thread pool, async controllers, and @Scheduled tasks actually work.
After Spring Boot Fundamentals, the natural next course is Spring Boot: Security & Advanced — Spring Security (authentication, authorization, OAuth2, JWT), advanced patterns (caching, reactive WebFlux, observability with Actuator and Micrometer), and the senior-engineer techniques that distinguish a working backend from a production one. Pairs naturally with this course as a two-course Spring Boot Mastery track.
Spring Boot Mastery
A Spring Boot learning track — from Spring Boot fundamentals through security and advanced patterns. Free MCQ practice with instant explanations across the framework most JVM backend roles run on. Assumes working Java; pairs with the Java Mastery track.
What learners say
Final-year placement prep. Honest about the 17-hour commitment — this is not a weekend course. The Spring Data JPA topic in particular was the most-asked area in two product-company interviews I sat. The MCQ format made the @Transactional propagation modes stick in a way that reading the docs never did.
Spent a month on this while building a new payments service at work. The Request Handling & Validation topic and the Exception Handling topic translated directly to my actual code — rewrote two endpoints after the @ControllerAdvice questions made the global handler pattern click. Course paid for itself in code-review feedback.
Solid coverage of the framework. The Testing topic with MockMvc and the slice annotations (@WebMvcTest, @DataJpaTest) was the most directly useful — I had been writing @SpringBootTest for everything, which made the test suite slow. Wish there were a few more questions on Testcontainers but the existing 1,500+ were dense and the explanations sharp.
Working Spring dev at a fintech, took this to firm up the bits I had been picking up by osmosis. The Auto-configuration topic and the conditional-bean trap questions in particular were the gaps I had — I never understood why my @Bean was being overridden until the In Practice topic broke it down explicitly.
Took this for a backend role transition. The IoC & DI topic finally made constructor injection click after years of writing field-injected code that I always sort of guessed at. The @Transactional self-invocation trap in the Spring Data JPA topic answered a real production bug from six months earlier — the explanation read like the post-mortem we should have written.