
Cursor Pagination Spring Boot API With Keyset Queries
Implement cursor (keyset) pagination in a Spring Boot API with an opaque cursor, a stable sort and a limit plus one query, using JdbcClient or Spring Data.
Controllers, request binding, validation and exception handlers for web apps built on the servlet stack.

Implement cursor (keyset) pagination in a Spring Boot API with an opaque cursor, a stable sort and a limit plus one query, using JdbcClient or Spring Data.

Add ETags to a Spring REST API: ShallowEtagHeaderFilter, strong ETags from a version, If-None-Match for 304 responses and If-Match for lost update protection.

Fix CORS errors from a browser calling a Spring Boot API by configuring allowed origins, methods and credentials, with and without Spring Security.

Implement an Idempotency-Key header in Spring Boot so a retried POST returns the first result: key storage, request hashing, concurrency and expiry.

Document a Java REST API with OpenAPI 3: springdoc-openapi in Spring Boot, annotations for summaries and responses, security schemes and exporting the spec.

Create a Quarkus 3 project, add a REST endpoint with JSON, run it in dev mode and write a test, in about fifteen minutes and with no prior Quarkus knowledge.

Prevent cross-site scripting in Java web apps with context-aware output encoding, safe template settings, a Content Security Policy and sanitizing rich text.

Mock HTTP dependencies with WireMock in JUnit: stubbing responses, verifying requests, simulating delays and faults, scenarios and Spring integration.

Test Spring MVC controllers with MockMvc and WebMvcTest: status, JSON, validation, security, uploads and exception handlers without a server.

Write readable API tests with REST Assured: given when then, JSON path checks, request specs, authentication, schema validation and Spring Boot setup.

Fetch only the columns you need with Spring Data JPA projections: interface and record DTOs, dynamic, nested and open projections, and limits.

What Open Session in View does in Spring Boot, why it hides LazyInitializationException, how it keeps a database connection longer, and how to spot its costs.
We send one email when a new post is published. No spam.