Tag

AspectJ

1 views collected around this technical thread.

JD Tech Talk
JD Tech Talk
Jun 10, 2025 · Backend Development

Instantly Spot Problematic SQL with MyBatis Interceptor Coloring

This article explains how to use SQL coloring in MyBatis by implementing a lightweight interceptor or an AspectJ weave to annotate each SELECT statement with its mapper ID and execution stack, enabling rapid identification of performance bottlenecks during high‑traffic events.

AspectJDatabase MonitoringJava
0 likes · 29 min read
Instantly Spot Problematic SQL with MyBatis Interceptor Coloring
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Apr 15, 2025 · Backend Development

Master Spring AOP: Real‑World AspectJ Pointcut & Advice Examples in Spring Boot 3

This comprehensive guide walks you through Spring Boot 3 AOP fundamentals, showing how to declare aspects with @Aspect, define pointcuts using @Pointcut, apply various advice types, manage ordering, bind method parameters, and leverage inter‑type declarations with clear code examples and diagrams.

AOPAdviceAspectJ
0 likes · 11 min read
Master Spring AOP: Real‑World AspectJ Pointcut & Advice Examples in Spring Boot 3
Cognitive Technology Team
Cognitive Technology Team
Apr 11, 2025 · Backend Development

Spring AOP Advice Execution Order Changes After Upgrading to Spring Boot 2.7.1

Upgrading to Spring Boot 2.7.1 (Spring Framework 5.3.21) alters the execution order of @Around, @Before, @After, @AfterReturning, and @AfterThrowing advice within the same @Aspect, causing ThreadLocal data loss and prompting a recommendation to consolidate logic into a single @Around advice.

AOPAdvice OrderAspectJ
0 likes · 3 min read
Spring AOP Advice Execution Order Changes After Upgrading to Spring Boot 2.7.1
vivo Internet Technology
vivo Internet Technology
Mar 19, 2025 · Operations

Cache Monitoring Practices for Redis and Caffeine in High‑Traffic Game Services

The article details practical monitoring strategies for both remote Redis and local Caffeine caches in high‑traffic game services, including prefix‑based Redis key tracking, Aspect‑oriented instrumentation, Caffeine statistics collection, and real‑world case studies that illustrate how these metrics identify hot‑keys, cache‑miss spikes, and reduce system load.

AspectJCache MonitoringGame Services
0 likes · 19 min read
Cache Monitoring Practices for Redis and Caffeine in High‑Traffic Game Services
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jan 7, 2025 · Backend Development

Master Spring AOP’s @DeclareParents: Dynamic Interface Injection in Spring Boot 3

This article explains how Spring AOP’s @DeclareParents introduces new interfaces to proxied beans at runtime, walks through defining interfaces, implementations, aspect configuration, testing with Spring Boot 3, and also covers perthis and pertarget aspect instantiation models for fine‑grained lifecycle control.

AspectJDynamic InterfaceJava
0 likes · 8 min read
Master Spring AOP’s @DeclareParents: Dynamic Interface Injection in Spring Boot 3
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 17, 2024 · Backend Development

Mastering Spring Boot 3 AOP: Advanced Pointcut Techniques & Advice Ordering

This article explains how to create simple AOP aspects in Spring Boot 3, then dives into complex scenarios such as combining pointcut expressions, sharing pointcuts across aspects, programmatic pointcut composition, and controlling advice execution order, providing clear code examples for each case.

AOPAspectJJava
0 likes · 8 min read
Mastering Spring Boot 3 AOP: Advanced Pointcut Techniques & Advice Ordering
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 14, 2024 · Backend Development

Mastering @Order in Spring Boot 3: Real‑World Examples and Best Practices

This article explains how the @Order annotation and Ordered interfaces control bean, listener, runner, and aspect execution order in Spring Boot 3, providing step‑by‑step code examples, output demonstrations, and guidance on applying ordering to various Spring components.

@OrderAspectJBean Ordering
0 likes · 8 min read
Mastering @Order in Spring Boot 3: Real‑World Examples and Best Practices
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 24, 2024 · Backend Development

Master Spring AOP Pointcut Expressions: Syntax, Examples, and Aspect Order

This article explains Spring AOP pointcut expression syntax, demonstrates how to match methods, packages, and beans with execution, within, and bean designators, shows how to combine expressions, and details controlling aspect execution order using @Order and the Ordered interface.

AspectJBackend DevelopmentJava
0 likes · 10 min read
Master Spring AOP Pointcut Expressions: Syntax, Examples, and Aspect Order
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Aug 4, 2024 · Backend Development

Enable Spring Dependency Injection for New Objects with @Configurable

This guide explains how to use Spring's @Configurable annotation and the AnnotationBeanConfigurerAspect to inject dependencies into objects created with new, covering environment setup, Maven configuration, AspectJ weaving, and advanced options like autowiring, constructor injection, and dependency checks.

AspectJBackend DevelopmentConfigurable
0 likes · 8 min read
Enable Spring Dependency Injection for New Objects with @Configurable
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Aug 1, 2024 · Backend Development

Why Spring AOP Sometimes Fails to Create Proxies and How to Fix It

This article explains Spring AOP’s core concepts, shows how proxies are normally created with @EnableAspectJAutoProxy, and details several edge cases—such as implementing Advice, Pointcut, Advisor, or using special bean names—where Spring will not generate a proxy, providing code examples and the resulting output for each scenario.

AspectJJavaProxy
0 likes · 8 min read
Why Spring AOP Sometimes Fails to Create Proxies and How to Fix It
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 8, 2024 · Backend Development

Mastering Spring AOP: Dynamic Proxy, Java Agent, and Maven Plugin Techniques

Explore three Spring AOP implementation methods—dynamic proxy, Java Agent, and AspectJ Maven plugin—by setting up a sample Service, defining aspects, configuring aop.xml and JVM arguments, and comparing their flexibility, performance impact, and compile‑time weaving within a Spring Boot 2.7 environment.

AOPAspectJDynamic Proxy
0 likes · 7 min read
Mastering Spring AOP: Dynamic Proxy, Java Agent, and Maven Plugin Techniques
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 10, 2024 · Backend Development

Why Does My Overridden Spring Aspect Log Twice? Debugging and Fixes

This article explains why a Spring AOP aspect that overrides a parent method logs twice, walks through the debugging process that reveals duplicate advisor creation, and presents two solutions—including a pointcut tweak and upgrading to Spring 6.1.8—to eliminate the redundant logs.

AOPAspectJJava
0 likes · 7 min read
Why Does My Overridden Spring Aspect Log Twice? Debugging and Fixes
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Apr 8, 2024 · Backend Development

Mastering Distributed Locks with Redisson in Spring Boot 2.7

This guide explains how to implement a robust, re‑entrant distributed lock using Redisson in a Spring Boot 2.7 application, covering basic and asynchronous APIs, Maven dependency setup, YAML configuration, custom annotation, AspectJ implementation, and comprehensive test cases.

AspectJDistributed LockJava
0 likes · 9 min read
Mastering Distributed Locks with Redisson in Spring Boot 2.7
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jan 19, 2024 · Backend Development

Master API Rate Limiting in SpringBoot with Caffeine Cache and Custom Annotations

This guide explains how to implement API rate limiting in SpringBoot 2.7.16 using custom annotations, AspectJ, and the high‑performance Caffeine cache, covering cache configuration, eviction policies, statistics, and practical code examples for annotation definition, aspect logic, and controller usage.

AnnotationsAspectJCache
0 likes · 10 min read
Master API Rate Limiting in SpringBoot with Caffeine Cache and Custom Annotations
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 29, 2023 · Backend Development

Mastering Spring AOP: Control Flow Pointcuts & Introduction Advice Explained

This tutorial walks through Spring AOP's control flow pointcuts and introduction advice, showing how to define dynamic pointcuts, create advisors, and use @DeclareParents to add interfaces to beans, complete with practical code examples and output analysis.

AspectJControl Flow PointcutIntroduction Advice
0 likes · 7 min read
Mastering Spring AOP: Control Flow Pointcuts & Introduction Advice Explained
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 8, 2023 · Backend Development

Mastering Spring Control Flow Pointcuts: A Hands‑On Example

This article explains Spring's control flow pointcuts, compares them with AspectJ cflow pointcuts, walks through a complete Java example with nested service classes, shows how to configure a ControlFlowPointcut and proxy, and discusses performance implications and usage scenarios.

AOPAspectJControl Flow Pointcut
0 likes · 8 min read
Mastering Spring Control Flow Pointcuts: A Hands‑On Example
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jan 31, 2023 · Backend Development

Master Spring AOP: Enabling @AspectJ and Building Custom Pointcuts

This article explains how to enable @AspectJ support in Spring (both via annotations and XML), defines custom AspectJ pointcuts and advice, and dives into Spring AOP APIs such as Pointcut, ClassFilter, MethodMatcher, and utility classes for composing pointcuts.

AOPAdviceAspectJ
0 likes · 10 min read
Master Spring AOP: Enabling @AspectJ and Building Custom Pointcuts
Cognitive Technology Team
Cognitive Technology Team
Oct 3, 2022 · Backend Development

Spring Boot 2.7.1 Upgrade Alters AOP Advice Execution Order and Causes ThreadLocal Loss

After upgrading to Spring Boot 2.7.1 (Spring Framework 5.3.21), the execution order of @Around, @Before, and @After advice changes, leading to ThreadLocal data loss inside @Around, and the article explains the cause, reproduces the issue, and recommends using only @Around for reliable logic.

AOPAdvice OrderAspectJ
0 likes · 4 min read
Spring Boot 2.7.1 Upgrade Alters AOP Advice Execution Order and Causes ThreadLocal Loss
Architecture & Thinking
Architecture & Thinking
Aug 16, 2022 · Backend Development

Unveiling Spring AOP: A Deep Dive into Source Code and Proxy Mechanics

This article provides a comprehensive analysis of Spring AOP, covering its core concepts, configuration parsing, BeanFactoryPostProcessor and BeanPostProcessor mechanisms, namespace handling, the creation of advisors and advice from @Aspect annotations, and the proxy generation process that enables method interception.

AOPAspectJBackend Development
0 likes · 32 min read
Unveiling Spring AOP: A Deep Dive into Source Code and Proxy Mechanics
Architecture Digest
Architecture Digest
Apr 26, 2022 · Backend Development

Implementing Request Logging with Spring AOP and Annotations

This article demonstrates how to create a request‑logging aspect in Spring Boot using AOP annotations, shows code for pointcuts, advices, high‑concurrency optimizations, exception handling, and trace‑ID propagation, and explains the underlying concepts and practical tips.

AOPAspectJJava
0 likes · 16 min read
Implementing Request Logging with Spring AOP and Annotations