Aspect
An aspect is a modular unit of cross-cutting behavior applied around selected program operations or method invocations.
Go by Example
Interceptor is a book-specific wrapper type that intercepts response-writing behavior while retaining access to the wrapped response writer.
- How it is used
- Captures HTTP response status codes in middleware while leaving handlers unaware of the wrapper.
- How deep it goes
- Explains embedding, method precedence, callbacks, status defaults, and optional-interface hazards; defers modern wrapper use beyond Unwrap.
- Examples
- Uses StatusCode middleware, WriteHeader hooks, a flushing handler, and an Unwrap implementation.
- What you can do after
- Build it from scratch: wrap a ResponseWriter to record status codes while forwarding normal response behavior.
Spring Security in Action, Second Edition
An aspect is a modular unit that encapsulates behavior applied across selected program execution points, commonly by intercepting method calls.
- How it is used
- Separates authorization and filtering concerns from protected method implementations through intercepted execution points.
- How deep it goes
- Explains interception, preauthorization, postauthorization, and prefiltering with execution flows and runnable examples.
- Examples
- Demonstrates protected document access, ownership-based product filtering, HTTP requests, and mutable versus immutable collections.
- What you can do after
- Apply it via Spring Security to authorize method calls, check returned values, or filter collection arguments.
Read how Spring Security in Action, Second Edition explains aspect →
Related concepts
- Springused by · Spring Framework is an open-source Java application framework that provides infrastructure and programming models for building applications, including dependency injection, configuration, and web and data-access capabilities.
- postfilteringused by · Postfiltering is filtering applied to a method's returned data before the caller receives it.
- http.ResponseWriterkind of · http.ResponseWriter is the Go interface through which an HTTP handler constructs a response by writing its headers, status, and body.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

