1
0
Files
spring-boot-demo/spring-aop
Ankur Mhatre 86246dc860 Three new article modules: configuration binding, profiles and config data, Spring AOP
configuration-properties/  @ConfigurationProperties vs @Value on Spring Boot 4.1.1.
  The relaxed-binding matrix is generated by binding each spelling rather than
  transcribed, and re-checked against real processes -- the in-process probe was
  wrong twice before it was right. Records the three findings that came out of it:
  @Value does get relaxed resolution inside Spring Boot (Boot attaches
  ConfigurationPropertySources), the configuration processor silently stops
  generating metadata on JDK 23+ when declared as a plain dependency, and @Valid is
  not what makes nested constraints run.

profiles-and-config/       Precedence, profiles, spring.config.import and config trees.
  /precedence reports every source holding a property in rank order with file and
  line, which turns "my profile file had no effect" into a two-line answer. Also
  pins the counterintuitive one: an imported file outranks the file that imported it.

spring-aop/                Designators, proxy types, and aspects that do not fire.
  One advice per supported designator so the reference table is generated from real
  matches; all fourteen unsupported designators fed to the parser. Two corrections to
  the reference documentation: unsupported designators throw
  UnsupportedPointcutPrimitiveException (extends RuntimeException, not
  IllegalArgumentException), and spring-boot-starter-aop was renamed to
  spring-boot-starter-aspectj in Boot 4.

19 contract tests across the three modules, 15 captured transcripts, all regenerated
by scripts/run-all.sh. Verified on Spring Boot 4.1.1, Spring Framework 7.0.9,
JDK 25.0.4.1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gip4srpzMwjgoba6uEfbr5
2026-09-08 16:47:48 +00:00
..

Spring AOP: designators, proxies, and aspects that do not fire

Companion project for Spring AOP Explained on ankurm.com.

Two halves. One set of aspects that work — one advice per pointcut designator, so the reference table is generated from real matches. One set that does not fire, each for a different reason, each paired with its fix.

Versions

Spring Boot 4.1.1
Spring Framework 7.0.9
AspectJ weaver 1.9.25.1
JDK Eclipse Temurin 25.0.4.1 (LTS)

Read this before copying a dependency block

In Spring Boot 3 the starter was spring-boot-starter-aop. In Spring Boot 4 it is spring-boot-starter-aspectj. The old artifact's last publication is 4.0.0-M2 and its last GA is 3.5.16, so a pre-4 dependency block fails resolution with a missing-version error.

Quickstart

export JAVA_HOME=/path/to/jdk-25
mvn -DskipTests package
./scripts/run-all.sh          # regenerate every transcript in docs/output/
mvn test                      # 6 contract tests

Endpoints

Endpoint Purpose
GET /aop/proxies per bean: proxied or not, which kind, and the advisor list
GET /aop/designators exercises every advised method, reports what each designator matched
GET /aop/parser feeds supported and unsupported expressions to the pointcut parser
GET /aop/broken runs the failure gallery and reports that nothing fired

Documentation

  1. What Spring AOP actually is
  2. The designator reference
  3. JDK dynamic proxies and CGLIB
  4. Advice types and ordering
  5. Six aspects that do not fire
  6. Diagnosing a silent aspect

Captured output

File Produced by
00-versions.txt scripts/demo-versions.sh
01-designators.txt scripts/demo-designators.sh
02-proxy-types.txt scripts/demo-proxy-types.sh
03-broken-gallery.txt scripts/demo-broken-gallery.sh

Two corrections to the reference documentation

  • Unsupported designators throw UnsupportedPointcutPrimitiveException, which extends RuntimeException directly — not IllegalArgumentException as the docs state. Catching the documented type will not catch it.
  • The framework default is interface-based proxying, but Spring Boot sets proxy-target-class=true, so you get CGLIB even for beans that implement interfaces. That changes which designators match; scripts/demo-proxy-types.sh shows both.