Tagged articles
AspectJ
70 articles · Page 1 of 1
This article dissects Spring Boot AOP from proxy creation (JDK vs CGLIB) and interceptor chain mechanics to practical aspects for logging, tracing, and idempotency, while exposing eight common pitfalls like self-invocation bypass, final method limits, and synchronous I/O in advice that degrade P99 latency.
AOPAspectJCGLIB
0 likes · 17 min read

The article explains that Spring's @Transactional annotation does not affect private methods because transactions are applied via proxy objects, but using AspectJ weaving or programmatic TransactionTemplate can overcome this limitation and ensure proper transaction handling.
AspectJCGLIBJava
0 likes · 6 min read

The article provides a step‑by‑step analysis of Spring AOP’s proxy creation process, explaining why some beans are proxied, how @Order, @EnableAspectJAutoProxy, proxyTargetClass and exposeProxy affect proxying, the differences between JDK and CGLIB proxies, and why private, static or final methods cannot be intercepted.
AOPAspectJBean Lifecycle
0 likes · 15 min read

A real‑world incident where mis‑ordered Spring AOP aspects caused payment callbacks to report success while the transaction rolled back leads to a concise rule—smaller @Order values have higher priority—plus pitfalls, three common scenarios, and a four‑step debugging guide that eliminates interview mistakes.
@OrderAspectJDebugging
0 likes · 8 min read

This article walks through a complete, step‑by‑step implementation of operation logging in a SpringBoot application using Spring AOP, covering log field design, Maven dependencies, entity and custom annotation creation, aspect definition with around advice, testing endpoints, and practical optimization tips such as real user extraction, database persistence, and sensitive data masking.
AOPAspectJBackend
0 likes · 17 min read


java1234Apr 7, 2026 · Backend Development
Spring AOP enables cross‑cutting concerns like logging and transactions without altering business code by leveraging dynamic proxies and method interceptor chains, and this article explains its core concepts, proxy selection (JDK vs CGLIB), call‑chain flow, key source classes, and provides a complete Java example.
AspectJCGLIBJava
0 likes · 8 min read

This guide explains how to replace static custom‑annotation permission checks in Spring Boot with flexible SpEL expressions, covering annotation design, aspect definition, expression parsing, context setup, and practical usage examples for various access scenarios.
AspectJCustom AnnotationJava
0 likes · 9 min read

This article introduces Aspect‑Oriented Programming in Spring Boot, explains core AOP concepts and terminology, and provides step‑by‑step code examples for creating logging, transaction management, and permission‑validation aspects using annotations such as @Aspect, @Around, @Before, and @Transactional.
AOPAspectJLogging
0 likes · 8 min read

After a system has been running, developers often drown in manual log statements to answer questions like why an interface is slow, who called a method, or what parameters were passed, but Spring Boot AOP lets you replace all that with a single annotation and aspect that automatically records calls, execution time, parameters, exceptions, and call chains, keeping business code clean.
AOPAspectJJava
0 likes · 8 min read

This article demonstrates how to extend Spring Boot 3's dependency injection to objects created with the new operator by using AspectJ load‑time weaving, @Configurable, META‑INF/aop.xml configuration, and the required -javaagent, providing step‑by‑step code examples and troubleshooting tips.
AspectJJava AgentLoad-Time Weaving
0 likes · 9 min read

Spring Boot AOP simplifies cross‑cutting concerns such as logging, transaction management, and monitoring by using proxy‑based aspect‑oriented programming; this guide walks through adding dependencies, core concepts, proxy mechanisms, configuration, defining aspects with various advice types, custom annotations, real‑world scenarios, best practices, and troubleshooting tips.
AOPAspectJJava
0 likes · 8 min read

This article explains Spring AOP fundamentals—including aspects, advice types, pointcuts, join points, and advice parameters—provides detailed code examples for each component, outlines the AOP workflow, showcases common use cases, and demonstrates a complete logging implementation with practical code snippets.
AdviceAspectJJava
0 likes · 19 min read

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.
AspectJJavaMyBatis
0 likes · 29 min read

This article introduces a lightweight SQL‑coloring technique for MyBatis that annotates each executed query with its mapper ID and call‑stack, enabling developers to pinpoint performance bottlenecks instantly without hunting through multiple code paths, and provides both MyBatis interceptor and AspectJ weaving implementations.
AspectJInterceptorJava
0 likes · 30 min read

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

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

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 MonitoringCaffeine
0 likes · 19 min read

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 InterfaceSpring AOP
0 likes · 8 min read

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

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.
AspectJSpring AOPbackend development
0 likes · 10 min read

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.
AspectJConfigurablebackend development
0 likes · 8 min read

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.
AspectJSpring AOPSpringBoot
0 likes · 8 min read

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.
AspectJJava AgentMaven Plugin
0 likes · 7 min read

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.
AspectJSpringBoot
0 likes · 7 min read

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

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

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

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

The article explains why logging API request and response parameters is essential for debugging, shows how to configure environment‑ and interface‑level switches, defines a simple @ApiLog annotation, implements an AOP aspect that records request details and response results, and demonstrates separating logs via Logback configuration while noting performance considerations.
AOPApiLogAspectJ
0 likes · 15 min read

This article explains how Spring AOP integrates AspectJ using CGLIB or JDK dynamic proxies, walks through a complete logging aspect example, and details the internal registration, proxy creation, and invocation processes that enable cross‑cutting concerns without modifying business code.
AOPAspectJCGLIB
0 likes · 15 min read

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

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

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.
AOPAspectJJava
0 likes · 32 min read

This article compares AspectJ and Spring AOP, explains the four types of Spring AOP support, details classic Spring AOP proxy creation, demonstrates various advice implementations, shows XML and annotation configurations, and introduces auto‑proxy creators for simplifying AOP setup in Java backend development.
AOPAspectJJava
0 likes · 10 min read

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

This Spring AOP tutorial explains how to modularize cross‑cutting concerns such as timing by defining an aspect with @Before, @After, @AfterReturning, @AfterThrowing and @Around advice, demonstrates refactoring a calculation service, and compares Spring’s proxy mechanisms to a custom JDK dynamic proxy implementation.
AOPAspectJDynamicProxy
0 likes · 17 min read

This guide explains how to create a custom annotation and an Aspect in Spring to capture detailed operation logs—including description, table name, parameters, user info, and execution result—and persist them to a database, covering AOP terminology, configuration styles, and complete code examples.
AspectJCustom AnnotationJava
0 likes · 15 min read

This article explains the common Spring AOP annotations such as @Before, @After, @AfterReturning, @AfterThrowing and @Around, demonstrates how to set up a Spring Boot project, write an interface, implementation, aspect, and discusses execution order, multiple aspects, and proxy‑failure scenarios.
AOPAnnotationsAspectJ
0 likes · 8 min read

This article revisits the fundamentals of Spring AOP, detailing its core annotations such as @Before, @After, @Around, and their execution sequence, while providing a complete demo project, code examples, and insights into common pitfalls like proxy failures and multi‑aspect ordering.
AnnotationsAspectJJava
0 likes · 9 min read

This article explains the execution order of Spring AOP annotations, demonstrates why an @Around advice may invoke a method twice when ProceedingJoinPoint.proceed() is called multiple times, and provides corrected code to ensure proper single execution.
AOPAspectJBackend
0 likes · 15 min read

This article explains how to create a custom logging solution in Spring by defining annotation-based AOP aspects, configuring pointcuts, handling various advice types, and persisting log details such as user, operation, parameters, and results into a database using Java code examples.
AOPAspectJCustom Annotation
0 likes · 14 min read

This guide explains how to create a custom Spring AOP annotation for detailed logging, defines the necessary annotation and aspect classes, shows how to extract method details, parameters and user info, store them in a database, and demonstrates required Spring XML configuration and usage examples.
AspectJCustom AnnotationJava
0 likes · 16 min read

This article demonstrates how to create a Spring AOP request‑logging aspect that captures request details, parameters, results, execution time, and error information, and discusses enhancements for high‑concurrency environments by aggregating log data into a single JSON object.
AOPAspectJJava
0 likes · 12 min read

This article explains how Spring AOP annotations such as @Before, @After, @Around and @AfterReturning are defined, demonstrates their usage with concrete Java code, analyzes why @Around may be invoked twice, and provides the correct implementation and execution flow of advice methods.
AOPAnnotationsAspect-Oriented Programming
0 likes · 14 min read

This article explains the fundamentals of Aspect‑Oriented Programming, introduces AspectJ as a standalone AOP solution, demonstrates how to implement a HelloWorld example with compile‑time weaving, compares it with Spring AOP’s runtime proxies, and shows how CGLIB can be used for proxy generation.
AOPAspectJJava
0 likes · 9 min read

This tutorial explains Java's proxy design pattern, bytecode manipulation, static proxies using AspectJ and JDK, dynamic proxies with JDK and CGLIB, and demonstrates how Spring AOP selects between these mechanisms, providing complete code examples for each approach.
AOPAspectJCGLIB
0 likes · 24 min read

This article explains how Spring AOP weaves aspect code using dynamic proxies, why internal calls via this bypass proxy logic, and how to correctly configure and obtain proxied beans using JDK/CGLIB proxies, @EnableAspectJAutoProxy, @Autowired injection, and AopContext.
AOPAspectJCGLIB
0 likes · 4 min read

Learn how to use Spring Boot’s AOP features to automatically fill creator, creation time, updater, and update time fields for any DAO insert or update operation, eliminating repetitive code and ensuring consistent audit logging across all database tables.
AOPAspectJJava
0 likes · 6 min read

This article explains why a custom AOP annotation like @MyMonitor may not trigger advice in Spring Boot, analyzes the proxy‑based limitation of Spring AOP, and provides practical solutions such as self‑injection or AspectJ mode to ensure the advice executes correctly.
AOPAspectJCustom Annotation
0 likes · 8 min read

This article presents a lightweight framework for constructing, collecting, and visualizing Android startup task information, replacing heavy systrace data with concise logs, Kotlin data structures, AspectJ instrumentation, and Python scripts that generate readable timelines and discrete charts to aid performance analysis.
AndroidAspectJPython
0 likes · 10 min read

This article demonstrates how to use Spring AOP to create a request‑logging aspect that captures request parameters, response data, execution time, and error information, while also addressing high‑concurrency logging issues and integrating trace‑ID tracking for easier debugging.
AOPAspectJJava
0 likes · 12 min read

This article walks through Spring’s AOP proxy creation process, detailing how enabling @EnableAspectJAutoProxy registers AnnotationAwareAspectJAutoProxyCreator, how it decides whether to wrap a bean, and the internal methods—wrapIfNecessary, isInfrastructureClass, shouldSkip, and advisor discovery—that together generate the dynamic proxies used at runtime.
AOPAspectJProxy
0 likes · 15 min read

This article demonstrates how to use Spring AOP to create a request‑logging aspect that captures IP, URL, HTTP method, parameters, results, execution time, and error details, while also addressing high‑concurrency logging issues and integrating trace‑ID tracking for easier debugging.
AOPAspectJJava
0 likes · 12 min read

This article introduces Aspect‑Oriented Programming in Java, explaining how AOP separates cross‑cutting concerns like logging using join points, pointcuts, advice, and aspects, and demonstrates dynamic proxies, various advice types, XML configuration, and aspect ordering within Spring AOP.
AOPAdviceAspect-Oriented Programming
0 likes · 20 min read

This article explains the five Spring AOP advice types, their execution order when combined in a single aspect, and provides a complete Java code example demonstrating before, after, after‑returning, after‑throwing, and around advices with normal and exceptional flows.
AOPAdviceAspectJ
0 likes · 6 min read

This article walks through the fundamentals of Spring AOP, showing how to replace repetitive logging code with AspectJ‑driven aspects, explains core AOP concepts, pointcut expressions, proxy creation mechanisms, advice types, caching behavior, and common pitfalls for Java backend developers.
AOPAdviceAspectJ
0 likes · 21 min read

This article demonstrates how to create a Spring AOP request‑logging aspect that captures request parameters, response data, execution time, and error information, while also handling high‑concurrency scenarios and integrating traceId support for easier log tracing.
AOPAspectJJava
0 likes · 13 min read

The article explains how to reduce redundant service calls in Java back‑end systems by passing required data from upper layers, applying cache annotations, and implementing an elegant ThreadLocal‑based caching mechanism using custom annotations, aspects, and filters to improve performance without extensive code changes.
AnnotationsAspectJJava
0 likes · 9 min read

This article explains the concept of AOP, its typical use cases, the underlying mechanisms of Spring AOP (JDK dynamic proxy and CGLIB), the relationship with AspectJ, and provides a complete XML‑free code example that demonstrates aspects, pointcuts, join points and advice.
AOPAspectJBackend
0 likes · 5 min read

This tutorial demonstrates how to integrate an AOP logging module into a Spring Boot project by adding required dependencies, creating a custom aspect that extends LBaseWebLogAspect, defining a pointcut, and exposing a sample REST endpoint that returns user data while logging detailed request information.
AOPAspectJJava
0 likes · 4 min read

This article provides a comprehensive guide to using AspectJ for aspect‑oriented programming in Android, covering core concepts such as aspects, join points, pointcuts and advice, demonstrating matching expressions, custom annotations, and detailing step‑by‑step integration with Gradle plugins and plugin implementation for seamless code weaving.
AOPAndroidAspectJ
0 likes · 16 min read

The article introduces Aspect‑Oriented Programming, explains its core concepts and compile‑time versus runtime models, and demonstrates how Android developers can employ compile‑time AOP (using AspectJ) to implement method‑level hot‑fixes, performance monitoring, logging, and other cross‑cutting features while weighing benefits, overhead, and optimization strategies.
AOPAndroidAspectJ
0 likes · 14 min read

This article provides a comprehensive analysis of Spring AOP's core proxy mechanisms, detailing the roles of advisor, advice, and pointcut classes, the annotation‑driven configuration process, and how Spring Boot automatically creates proxies using JDK or CGLIB based on configuration flags.
AspectJCGLIBJDK Dynamic Proxy
0 likes · 19 min read

This article provides a comprehensive analysis of Spring AOP, covering its core classes, multiple proxy mechanisms, annotation‑based configuration in Spring Boot, the differences between Spring Boot 1.x and 2.x AOP settings, and detailed source‑code snippets that illustrate how advisors, pointcuts, and advices are created and applied.
AspectJJavaProxy
0 likes · 22 min read

To avoid crashes and missing messages caused by newer Android restrictions on Toast—such as disabled notifications, BadTokenException on pre‑8.0 devices, and token‑null errors on Android 7.1—developers intercept Toast.show with AspectJ, replace it with a custom MToast, handle exceptions, and ultimately migrate to a robust Snackbar‑based notification system.
AndroidAspectJToast
0 likes · 18 min read

This article explains Aspect‑Oriented Programming, compares AspectJ's compile‑time static weaving with Spring AOP's runtime dynamic proxies (JDK and CGLIB), and demonstrates both approaches through complete Java code examples and execution results.
AOPAspectJCompile-time weaving
0 likes · 7 min read

This tutorial explains the fundamentals of Spring AOP, introduces key terminology and pointcut expressions, demonstrates how to configure various advice types, and provides a complete Spring Boot example that uses an aspect to automatically record web request logs with minimal code changes.
AOPAspectJSpring Boot
0 likes · 14 min read

This guide explains practical techniques for spotting basic memory leaks, using the MAT tool to analyze heap dumps, comparing hprof files, and implementing daily leak monitoring in Android apps through AspectJ instrumentation, MLD utilities, and UIAutomator automation.
AndroidAspectJMAT
0 likes · 9 min read

This article examines the challenges of lazy loading in J2EE ORM tools, compares eager fetching and pre-fetching, and proposes a modular solution using Aspect‑Oriented Programming to inject custom fetching strategies at the repository level, reducing SQL queries, connection usage, and code bloat.
AspectJFetching StrategyORM
0 likes · 12 min read

This article explains how to build a highly configurable, extensible, and maintainable embedded process flow by leveraging Spring AOP and AspectJ to create a lightweight alternative to heavyweight BPM engines, detailing the architecture, design, code examples, and a purchase‑item use case.
AOPAspectJJava
0 likes · 19 min read
