Tagged articles

Aspect Order

2 articles · Page 1 of 1
Java Tech Workshop
Java Tech Workshop
Jun 26, 2026 · Backend Development

Controlling Execution Order in Multi‑Layer Spring AOP Aspect Nesting

When a Spring project uses more than two AOP aspects, the resulting multi‑layer nesting can cause sensitive data leaks, excessive logging, missed alerts, inconsistent responses, and random bugs; this article explains why ordering issues occur, how the onion model works, and provides concrete configuration strategies to achieve deterministic execution order.

Aspect OrderExecution ChainMulti-layer Nesting
0 likes · 15 min read
Controlling Execution Order in Multi‑Layer Spring AOP Aspect Nesting
Java Architect Essentials
Java Architect Essentials
May 20, 2025 · Backend Development

Ensuring Idempotency with Distributed Locks: Adjusting Aspect Order in Java Backend

This article explains how using a custom @DistributeLock annotation together with @Transactional can cause idempotency issues due to aspect execution order, and demonstrates how to prioritize the lock aspect using @Order to ensure the lock is applied before the transaction, with code examples and best‑practice recommendations.

Aspect OrderDistributed LockJava
0 likes · 6 min read
Ensuring Idempotency with Distributed Locks: Adjusting Aspect Order in Java Backend