Skip to main content

94 docs tagged with "spring-boot"

View all tags

API Contract

The single REST endpoint, full request and response shapes, Bean Validation rules, and what happens when validation fails.

API Design

Principles and patterns for designing clear, versioned, and client-friendly REST, gRPC, and GraphQL APIs in Java/Spring Boot services.

API Design — Practical Demo

Scenario-based walkthrough of designing a production-quality REST API with versioning, pagination, error handling, and rate-limiting headers in Spring Boot 3.

Application Properties & Configuration

How Spring Boot externalizes configuration using application.properties/yml, profiles, @Value, and @ConfigurationProperties for structured, type-safe config binding.

Caching Strategies

Patterns for caching application data — cache-aside, write-through, write-behind — eviction policies, TTL design, and cache stampede prevention in Spring Boot with Redis.

Caching Strategies — Practical Demo

Scenario-based walkthrough of implementing cache-aside with Redis in Spring Boot — including TTL configuration, cache eviction, and stampede prevention.

Cloud

AWS/GCP/Azure, cloud-native patterns, managed services.

Connection Pooling & HikariCP

Why connection pooling is essential, how HikariCP works, and how to configure it correctly in Spring Boot applications.

CSRF and CORS in Spring Security

How Spring Security prevents Cross-Site Request Forgery attacks with CSRF tokens, when to disable CSRF for REST APIs, and how to configure CORS for Single-Page Applications talking to Spring Boot backends.

Databases Interview Questions

Consolidated interview Q&A for the Databases domain — SQL, indexes, transactions, connection pooling, NoSQL, and schema migration — beginner through advanced.

Databases Overview

Quick-reference summary of SQL, indexes, transactions, connection pooling, NoSQL trade-offs, and schema migration for Java backend engineers.

Demo: MySQL, PostgreSQL & H2 Guide

Step-by-step runnable examples for MySQL vs PostgreSQL vs H2 — UUID primary keys, H2 compatibility mode, profile-based datasource switching, and Testcontainers.

DevOps

CI/CD pipelines, monitoring, observability, Spring Boot Actuator.

Distributed Systems

Core theory behind distributed systems — CAP theorem, consistency models, idempotency, and the Saga pattern for distributed transactions — for Java/Spring Boot backend engineers.

Domain Model

The entities, DTOs (Java Records), and enums that represent the core concepts of a loan application — and why each was designed the way it was.

Exception Handling

How GlobalExceptionHandler uses @RestControllerAdvice to intercept validation failures and unexpected errors and convert them into structured JSON responses.

Exception Handling — Practical Demo

Hands-on Spring Boot demo of @ControllerAdvice, ProblemDetail error responses, validation error shaping, and the catch-all exception handler pattern.

Exception Handling in Spring MVC

How to centralise HTTP error responses in Spring Boot — @ExceptionHandler, @ControllerAdvice, ProblemDetail (RFC 7807), and mapping domain exceptions to the right status codes.

Indexes & Query Performance

How database indexes work, when to add them, how to read EXPLAIN plans, and common indexing pitfalls that hurt performance.

Integration Tests

How to use @SpringBootTest with TestRestTemplate and WebTestClient to write full-context Spring Boot integration tests.

Integration Tests — Practical Demo

Hands-on walkthrough of @SpringBootTest with TestRestTemplate, @MockBean for external dependencies, and Testcontainers for real database integration.

Interview Prep

Consolidated domain-specific Q&A for Java backend engineering interviews.

JPA Basics — Entity Mapping and Relationships

How to map Java classes to database tables using @Entity, @Id, @GeneratedValue, and relationship annotations (@OneToMany, @ManyToOne), including fetch type defaults and their implications.

JUnit 5

The foundational Java testing framework — lifecycle annotations, assertions, parameterized tests, and test organization.

JWT Authentication in Spring Security

JSON Web Token structure, signing (symmetric vs. asymmetric), validation, and how to wire stateless JWT authentication into a Spring Boot REST API using Spring Security's OAuth2 Resource Server support.

Loan Application Evaluator

A Spring Boot REST service that evaluates loan applications using risk classification, EMI calculation, and eligibility rules — covered layer by layer.

Microservices

An architectural style that structures an application as a collection of small, independently deployable services — each owning its data and business logic.

Microservices — Practical Demo

Scenario-based walkthrough of building a two-service Order + Inventory microservices topology with service discovery, Kafka events, and Spring Boot 3.

Mockito

How to create mock objects, stub method calls, verify interactions, and capture arguments in Java unit tests.

MockMvc & WebTestClient

How to test Spring MVC and Spring WebFlux controllers at the HTTP level without starting a real server, using MockMvc and WebTestClient.

MySQL, PostgreSQL & H2 — Database Guide

Practical guide to MySQL, PostgreSQL, and H2 for Java developers — architecture differences, UUID handling, H2 for development, and migration paths to production databases.

NoSQL Trade-offs

CAP theorem, BASE properties, and when to choose Redis, MongoDB, Cassandra, or Elasticsearch over a relational database.

OAuth2 and OpenID Connect in Spring Security

OAuth2 authorization flows, the resource server and authorization server patterns, OpenID Connect identity layer, and how to configure Spring Boot as an OAuth2 client and resource server.

OpenAPI & Springdoc

Auto-generating interactive API documentation for Spring Boot REST APIs using springdoc-openapi — setup, @Operation/@Schema annotations, security schemes, and customisation.

Overviews

Quick-reference summaries for every domain — designed for rapid revision before interviews.

Persistence Layer

How LoanApplication is mapped to H2 using JPA @Embeddable value objects, @ElementCollection for rejection reasons, and @PrePersist for UUID generation.

Project Overview

What the Loan Application Evaluator does, why it exists, its tech stack, and how to run it locally.

Projects

End-to-end Java Spring Boot project walkthroughs — annotated source code deep-dives for interview preparation and real-world learning.

Projects Overview

Quick-reference summary of the Loan Application Evaluator project — architecture, key patterns, tech stack decisions, and top interview talking points.

Reliability Patterns

Circuit Breaker, Retry, Bulkhead, Timeout, and Rate Limiter — the five resilience patterns that prevent cascading failures in distributed Spring Boot services, implemented with Resilience4j.

Resume-Based Interview Questions

Interview Q&A mapped directly to resume experiences — legacy migration, security hardening, containerization, Apache POI, and behavioral STAR stories.

Scalability Patterns

Horizontal vs vertical scaling, stateless services, read replicas, database sharding, and load balancing — the patterns that allow a Java/Spring Boot system to handle growing traffic.

Scalability Patterns — Practical Demo

Scenario-based walkthrough of making a Spring Boot service horizontally scalable — stateless sessions with Redis, connection pool tuning, read replica routing, and async offloading.

Service & Business Logic

How the LoanApplicationService evaluates a loan — risk classification, interest rate calculation, EMI formula, and the two-tier eligibility check — step by step.

SOLID Principles

Five design principles that make object-oriented code easier to maintain, extend, and test — the foundation of clean Java design.

Spring Boot

Auto-configuration, starters, beans, DI, AOP, Actuator, and production-ready patterns.

Spring Boot Actuator

Spring Boot Actuator exposes built-in HTTP/JMX endpoints for health checks, metrics, environment inspection, and live bean graphs — essential for production monitoring and operations.

Spring Boot Auto-Configuration

How Spring Boot uses @EnableAutoConfiguration and @ConditionalOn* annotations to wire beans automatically based on what is on the classpath.

Spring Boot Interview Questions

Consolidated interview Q&A for Spring Boot covering auto-configuration, properties, starters, Actuator, and testing — beginner through advanced.

Spring Boot Overview

Quick-reference summary of Spring Boot auto-configuration, properties, starters, Actuator, and testing — key concepts, annotations, and interview questions at a glance.

Spring Boot Starters

What starters are, how they bundle dependencies and trigger auto-configuration, and what the most common starters wire up in a Spring Boot application.

Spring Boot Test Slices

How to use @WebMvcTest, @DataJpaTest, and @JsonTest to write fast, focused Spring Boot tests that load only the layers you need.

Spring Boot Testing

How to test Spring Boot applications using @SpringBootTest, test slices (@WebMvcTest, @DataJpaTest), @MockBean, and Testcontainers for integration tests with real infrastructure.

Spring Data Caching

How Spring's cache abstraction works with @Cacheable, @CacheEvict, @CachePut, and @Caching, plus integrating Caffeine and Redis as backing stores.

Spring Data Interview Questions

Consolidated interview Q&A for Spring Data JPA covering JPA mapping, repositories, transactions, N+1, projections, and caching — beginner through advanced.

Spring Data Repositories

How Spring Data JPA's repository interfaces (CrudRepository, JpaRepository) eliminate DAO boilerplate through query method derivation and @Query for JPQL and native SQL.

Spring MVC

How Spring MVC processes HTTP requests — DispatcherServlet, @RestController, request mapping, parameter binding, and ResponseEntity patterns used in everyday Spring Boot APIs.

Spring MVC — Practical Demo

Hands-on Spring MVC examples covering DispatcherServlet internals, parameter binding, validation, content negotiation, and interceptors.

Spring Security Authentication

How Spring Security authenticates users — UserDetailsService, PasswordEncoder, AuthenticationManager, and the authentication flow from credentials to SecurityContext.

Spring Security Authorization

How Spring Security enforces access control — URL-based rules with requestMatchers, method-level security with @PreAuthorize and @Secured, and the role vs. authority distinction.

Spring Security Filter Chain

How Spring Security's ordered chain of servlet filters intercepts every HTTP request and applies authentication and authorization before the request reaches your controller.

SQL Fundamentals

Core SQL syntax and concepts — SELECT, JOIN types, GROUP BY, window functions, and subqueries — with Spring Boot JDBC context.

System Design

High-level architecture, microservices, distributed systems, SOLID principles, caching, reliability patterns, API design, and scalability for Java/Spring Boot engineers.

System Design Interview Questions

Consolidated interview Q&A for System Design — covering SOLID principles, microservices, API design, caching, reliability patterns, distributed systems, and scalability.

System Design Overview

Quick-reference summary of System Design concepts — SOLID, microservices, API design, caching, reliability patterns, distributed systems, and scalability — with top interview questions.

Testcontainers

How to use Testcontainers to run real PostgreSQL, MySQL, Redis, and Kafka instances inside Docker containers during Java tests.

Testcontainers — Practical Demo

Hands-on examples for running PostgreSQL, Redis, and Kafka in Docker containers during tests, with Spring Boot 3.1+ @ServiceConnection.

Testing

Unit testing, integration testing, Testcontainers, Mockito, JUnit 5.

Testing Interview Questions

Consolidated interview Q&A for Java Testing covering JUnit 5, Mockito, Spring Boot test slices, integration tests, Testcontainers, MockMvc, and WebTestClient.

Testing Overview

Quick-reference summary of Java testing concepts — JUnit 5, Mockito, Spring Boot test slices, integration tests, Testcontainers, MockMvc, and WebTestClient.

Testing Strategy

How LoanApplicationService is unit-tested with JUnit 5 and Mockito — covering risk classification, EMI calculation, and all eligibility rules using @Nested test classes.

Transactions & ACID

Database transactions, the four ACID properties, isolation levels, and how deadlocks occur — with Spring @Transactional context.

Web & REST Interview Questions

Consolidated interview Q&A for the Web & REST domain — HTTP fundamentals, REST design, Spring MVC, exception handling, WebFlux, and OpenAPI — beginner through advanced.

Web & REST Overview

Quick-reference summary of HTTP fundamentals, REST design, Spring MVC, exception handling, WebFlux, and OpenAPI for Java backend engineers.

WebFlux & Reactive — Practical Demo

Hands-on Spring WebFlux examples covering Mono/Flux basics, annotated controllers, functional routing, parallel I/O with Mono.zip, and SSE streaming.

WebFlux & Reactive Programming

Spring WebFlux — the reactive, non-blocking alternative to Spring MVC — covering Mono, Flux, functional endpoints, backpressure, and when to choose reactive over the blocking model.