What is the role of the Pageable interface in Spring Data?
Pageable describes a page request: number, size and sort. See how to build it, pass it to repositories and resolve it from HTTP parameters.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
Pageable describes a page request: number, size and sort. See how to build it, pass it to repositories and resolve it from HTTP parameters.
Understand same-origin policy and preflight requests, then configure cross-origin access in Spring Boot MVC, Security and WebFlux with explicit origins.
@InitBinder configures the WebDataBinder before Spring MVC binds form data to objects. Learn trimming, formatters, allowed fields and validators with examples.
Combine Bean Validation, parameterized queries, output encoding and allow-list HTML sanitizing to keep untrusted input from harming a Spring Boot application.
@Validated triggers Bean Validation with groups and enables method validation on beans. See how it differs from @Valid and which exceptions it raises.
Customize Bean Validation messages in Spring Boot with annotation attributes, messages.properties, locale files and a clean ProblemDetail error response.
Use spring-boot-starter-validation, Jakarta constraint annotations and @Valid to validate requests, then return structured 400 errors from one exception handler.
How the jjwt Claims interface exposes the exp claim, how the parser rejects expired tokens, and how to handle expiration in a Spring Boot filter.
Configure JWT expiry in Spring Boot with jjwt 0.12, handle ExpiredJwtException, issue rotating refresh tokens and test token expiry with a fixed Clock.
Configure session timeout and secure cookies in Spring Boot, share sessions across instances with Spring Session, or go stateless with tokens.
The spring-boot-starter-data-redis starter adds Spring Data Redis and the Lettuce client and auto-configures templates, caching and connections.
@Cacheable is a Spring annotation, and Redis is the store behind it. Learn how to configure RedisCacheManager, TTLs and serialisation in Spring Boot 3.
The propagation attribute decides whether a transactional method joins, suspends or avoids an existing transaction. See each level with examples and rollback behaviour.
Propagation.NESTED runs inside the outer transaction and rolls back to a savepoint on failure. Learn how to use it and why it sometimes seems to do nothing.
@Before, @After, and @Around are Spring AOP advice types that run code around method calls. Learn how they differ and when to choose each.
Learn to write Spring AOP pointcuts with @Pointcut, execution, within and @annotation, reuse them in advice, and avoid proxy pitfalls.
The @Aspect annotation declares a Spring AOP aspect. Learn how to enable it, write pointcuts and advice, and avoid self-invocation and proxy limits.
Add the AOP starter, create an @Aspect component and apply advice through a custom annotation. Covers auditing, security checks, pointcuts and testing.
@Slf4j is a Lombok annotation that generates an SLF4J logger in your class. Learn setup, usage with Spring Boot logging and common pitfalls.
Set up Actuator, Micrometer metrics, tracing and slow-query visibility to find and fix performance problems in a Spring Boot application.