How do you implement filtering in Spring Boot applications?
Filter data with optional request parameters and JPA Specifications, and filter requests with OncePerRequestFilter. Includes when to use each approach.
2,886 posts about Java: questions with answers, tutorials and articles, newest first.
Filter data with optional request parameters and JPA Specifications, and filter requests with OncePerRequestFilter. Includes when to use each approach.
Set up Azure Blob Storage in Spring Boot with managed identity, a BlobServiceClient bean, and upload, download, list, delete and SAS examples.
Sort is Spring Data's portable way to describe ordering by property and direction. See how to build it, use it with repositories and pagination.
Put a Sort inside your Pageable and Spring Data JPA applies ORDER BY with LIMIT and OFFSET. Learn multi-field sorting, controller parameters and safe allow-lists.
Use Spring Cloud Azure starters with DefaultAzureCredential to connect Spring Boot to Blob Storage, Azure SQL and Cosmos DB without storing secrets.
Page holds one slice of results plus total counts and navigation helpers. See how to produce it, serialize it safely and avoid its count query cost.
Step-by-step guide to calling the Google Cloud Vision API from Spring Boot with Application Default Credentials, a client bean, a service and a REST endpoint.
Spring Data REST paginates repositories out of the box. Learn the page, size and sort parameters, page-size limits, search methods and projections.
PubSubTemplate wraps the Google Cloud Pub/Sub client so Spring Boot code can publish, subscribe, pull and acknowledge messages with a few method calls.
Add paging to a Spring Boot REST API with Pageable and Page, return a stable JSON shape, cap page sizes and sort safely.
RepresentationModel carries hypermedia links in Spring HATEOAS responses. See how to extend it, add links with linkTo and use EntityModel and assemblers.
Return EntityModel and CollectionModel from controllers and build links with linkTo and methodOn so your REST API responses guide clients to the next step.
EntityModel wraps a domain object with hypermedia links, so Spring REST clients can discover related actions instead of hard-coding URLs.
Build a Spring Boot HATEOAS API with HAL links, a model assembler, paged results and tests, and learn how clients follow links by relation name.
Add the Spring Cloud GCP starter, publish with PubSubTemplate and consume with subscribe or an inbound adapter, including acknowledgement and emulator testing.
This Spring converter reads and writes JSON with Jackson's ObjectMapper. See how it works, how to customise it and what changes with Jackson 3.
Use @ResponseBody or @RestController and let Jackson serialize the return value. This guide covers content negotiation, ResponseEntity and plain Spring MVC setup.
Use the google-cloud-storage client in Spring Boot to stream uploads and downloads, authenticate with Application Default Credentials and share files with signed URLs.
@ResponseBody makes Spring write a method's return value to the response body as JSON, text or XML instead of resolving a view. Learn how it works.
Define custom exceptions in Spring, throw them from services and turn them into consistent ProblemDetail JSON errors with @RestControllerAdvice.