Spring Boot Request Validation with @Valid: Clear 400 Errors
Validate Spring Boot request bodies and parameters with @Valid and Jakarta constraints, return clear 400 errors, and avoid silent gaps.
Focused explanations and longer guides, with worked scenarios, common mistakes and interview exercises across every chapter.
Showing 169–192 of 200 articles
Validate Spring Boot request bodies and parameters with @Valid and Jakarta constraints, return clear 400 errors, and avoid silent gaps.
Why Spring @Transactional commits on checked exceptions, how rollbackFor and noRollbackFor work, and why swallowed exceptions commit.
How Spring Boot liveness and readiness probes work on Kubernetes, what belongs in each health group, and how to warm up and shut down gracefully.
Why long @Transactional methods exhaust the Hikari pool and hold locks, and how to keep remote calls, files and email outside the transaction.
Why joining two one-to-many tables before SUM inflates totals, and how to aggregate each child table at its own grain before you combine them.
Use EXISTS when you're asking whether a related row exists: no duplicate rows, NULL-safe NOT EXISTS, and semi or anti joins in PostgreSQL plans.
Predict how many rows a SQL join returns: duplicate lookup keys multiply rows, inner joins drop unmatched ones, and both can hide in one count.
Why OFFSET pages get slow and drift, and how keyset pagination with a unique tiebreaker and a row comparison stays fast at any depth.
How PostgreSQL UPDATE writes a new row version, why dead tuples pile up, what VACUUM reclaims, and how one idle transaction stops cleanup.
NULL makes comparisons unknown, not false. See how that drops rows from WHERE, empties NOT IN and slips past CHECK constraints.
Watch two PostgreSQL sessions lose an update, then fix it with an atomic UPDATE or FOR UPDATE, and see what NOWAIT and SKIP LOCKED do.
Run Read Committed, Repeatable Read and Serializable side by side in PostgreSQL, from changing reads to write skew only Serializable stops.
Why a hot key expiring under 5,000 requests a second sends 1,500 queries to the database, and how locks, early refresh and jitter stop it.
A worked back-of-envelope estimate for a photo app: peak requests per second, storage per year, egress bandwidth and how wrong it might be.
Classify each dependency as required or optional, set timeouts that bound bad days, and design fallbacks that never show users false data.
Fan-out on write versus read for a 20-million-user feed, with simulated insert rates, an 11.5M-follower post and where a hybrid threshold goes.
Snowflake IDs, UUIDv4 and UUIDv7 compared with runnable code: collision odds, 4,096 IDs per millisecond, and why clock skew breaks ordering.
Design metrics, traces and logs from the questions on-call engineers ask: SLO burn-rate math, label cardinality and tracing across a queue.
Choosing a partition key, why hash mod N moves 91% of keys when you add a node, how consistent hashing fixes it, and how to split a hot key.
Fixed window, sliding window and token bucket limiters run on the same burst, plus who to limit, enforcing across gateways and 429 responses.
How T extends U ? X : Y picks a type, why it splits unions apart member by member, and how wrapping both sides in brackets turns that off.
Replace isLoading, error and data flags with one status union so impossible UI states stop compiling and each branch sees only its own fields.
Why strict mode types catch variables as unknown, how to narrow them without casting, and when a Result union beats throwing an error.
Use extends to state what a generic needs, keyof to link one parameter to another, and see why 'a different subtype' errors appear.
No notes match that… try another filter.