Skip to main content

94 docs tagged with "demo"

View all tags

Adapter Pattern — Practical Demo

Hands-on examples of the Adapter pattern — wrapping incompatible APIs, integrating third-party SDKs, and using Spring DI as an adapter.

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.

Authentication — Practical Demo

Hands-on code examples for Spring Security authentication — UserDetailsService, BCrypt, custom login endpoint, and accessing the current user.

Authorization — Practical Demo

Hands-on examples for Spring Security authorization — URL rules, @PreAuthorize, SpEL expressions, ownership checks, and testing access control.

Caching Strategies — Practical Demo

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

CSRF and CORS — Practical Demo

Hands-on examples for CSRF protection and CORS configuration in Spring Boot — Cookie-based CSRF for SPAs, production CORS setup, fixing the preflight 401 problem, and testing with MockMvc.

Custom Exceptions — Practical Demo

Hands-on examples for building domain-specific exception hierarchies, adding typed fields, chaining exceptions, and integrating with Spring Boot's @ControllerAdvice.

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.

Exception Handling — Practical Demo

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

Generics — Practical Demo

Hands-on code examples for generic classes, generic methods, bounded type parameters, and the diamond operator.

Integration Tests — Practical Demo

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

JPA Basics — Practical Demo

Hands-on code examples for JPA entity mapping, relationships, fetch types, and Spring Data auditing in a simple e-commerce domain.

JUnit 5 — Practical Demo

Hands-on code examples and step-by-step walkthroughs for JUnit 5 lifecycle, assertions, and parameterized tests.

JWT Authentication — Practical Demo

Hands-on examples for JWT authentication in Spring Boot — generating tokens, validating with Spring Security's resource server, custom claims, and refresh token pattern.

List — Practical Demo

Hands-on examples for ArrayList vs LinkedList, pre-sizing, safe removal, and subList behavior.

Locks — Practical Demo

Hands-on walkthroughs of ReentrantLock, ReadWriteLock, tryLock with timeout, and Condition-based signaling.

Map — Practical Demo

Hands-on examples for HashMap, LinkedHashMap, TreeMap, and ConcurrentHashMap — frequency counting, LRU cache, range queries, and atomic operations.

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 — Practical Demo

Hands-on code examples for creating mocks, stubbing behavior, verifying interactions, and capturing arguments with Mockito.

OAuth2 and OIDC — Practical Demo

Hands-on examples for OAuth2 and OpenID Connect in Spring Boot — social login, resource server with external auth server, client credentials for microservices, and accessing OIDC user info.

Optional — Practical Demo

Hands-on examples for Optional creation, chained transformations, orElseGet laziness, and common anti-patterns.

Proxy Pattern — Practical Demo

Hands-on examples showing manual proxies, JDK dynamic proxies, and how Spring AOP uses proxies for @Transactional and @Cacheable.

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.

Set — Practical Demo

Hands-on examples for HashSet, LinkedHashSet, and TreeSet — uniqueness enforcement, ordering differences, and set operations.

Spring MVC — Practical Demo

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

Testcontainers — Practical Demo

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

Transactions — Practical Demo

Hands-on examples for @Transactional propagation, readOnly optimization, rollbackFor, the self-invocation trap, and programmatic transactions.

Type Erasure — Practical Demo

Hands-on code examples demonstrating what you can and cannot do because of Java's type erasure — instanceof, new T(), overloading, and the super type token pattern.

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.

Wildcards — Practical Demo

Hands-on code examples for unbounded wildcards, upper-bounded (? extends T), lower-bounded (? super T), and the PECS rule.