Tagged articles
61 articles
Page 1 of 1
java1234
java1234
Apr 7, 2026 · Backend Development

What’s Under the Hood of Spring AOP? A Deep Dive into Its Core Mechanisms

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.

Dynamic ProxyJavaaspectj
0 likes · 8 min read
What’s Under the Hood of Spring AOP? A Deep Dive into Its Core Mechanisms
Architect's Guide
Architect's Guide
Mar 30, 2026 · Backend Development

Mastering Dynamic Permission Checks in Spring Boot with SpEL

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.

AuthorizationCustom AnnotationJava
0 likes · 9 min read
Mastering Dynamic Permission Checks in Spring Boot with SpEL
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 6, 2025 · Backend Development

Unlock Full Dependency Injection in Spring Boot 3 with Load‑Time Weaving

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.

Backend DevelopmentJava AgentLoad-Time Weaving
0 likes · 9 min read
Unlock Full Dependency Injection in Spring Boot 3 with Load‑Time Weaving
Ray's Galactic Tech
Ray's Galactic Tech
Sep 25, 2025 · Backend Development

Master Spring Boot AOP: Practical Guide to Logging, Transactions, and Performance

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.

Backend DevelopmentJavaSpring Boot
0 likes · 8 min read
Master Spring Boot AOP: Practical Guide to Logging, Transactions, and Performance
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.

Database MonitoringJavaMyBatis
0 likes · 29 min read
Instantly Spot Problematic SQL with MyBatis Interceptor Coloring
JD Cloud Developers
JD Cloud Developers
Jun 10, 2025 · Backend Development

How to Instantly Spot Problematic SQL with MyBatis Interceptor Coloring

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.

InterceptorJavaMyBatis
0 likes · 30 min read
How to Instantly Spot Problematic SQL with MyBatis Interceptor Coloring
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.

Cache MonitoringCaffeineaspectj
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.

Dynamic InterfaceSpring Bootaspectj
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
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.

Backend DevelopmentConfigurableaspectj
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.

SpringBootaspectjspring-aop
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.

Dynamic ProxyJava AgentMaven Plugin
0 likes · 7 min read
Mastering Spring AOP: Dynamic Proxy, Java Agent, and Maven Plugin Techniques
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.

Advice OrderBackend DevelopmentSpring Boot
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.

Backend DevelopmentJavaaop
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.

Javaaopaspectj
0 likes · 16 min read
Implementing Request Logging with Spring AOP and Annotations
Java Tech Enthusiast
Java Tech Enthusiast
Apr 23, 2022 · Backend Development

Spring AOP Tutorial with Code Examples

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.

DynamicProxyJavaaop
0 likes · 17 min read
Spring AOP Tutorial with Code Examples
Programmer DD
Programmer DD
Mar 16, 2022 · Backend Development

Implement Custom Annotation Logging with Spring AOP

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.

Custom AnnotationJavaaspectj
0 likes · 15 min read
Implement Custom Annotation Logging with Spring AOP
Top Architect
Top Architect
Feb 16, 2022 · Backend Development

Understanding Spring AOP Annotations and Their Execution Order

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.

JavaProxyannotations
0 likes · 8 min read
Understanding Spring AOP Annotations and Their Execution Order
Programmer DD
Programmer DD
Feb 16, 2022 · Backend Development

Master Spring AOP: Essential Annotations, Execution Order, and Common Pitfalls

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.

Backend DevelopmentJavaProxy
0 likes · 9 min read
Master Spring AOP: Essential Annotations, Execution Order, and Common Pitfalls
Top Architect
Top Architect
Dec 23, 2021 · Backend Development

Implementing Custom Logging with Spring AOP and Annotations

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.

Custom AnnotationJavaaop
0 likes · 14 min read
Implementing Custom Logging with Spring AOP and Annotations
Java Backend Technology
Java Backend Technology
Dec 21, 2021 · Backend Development

Implement Custom Logging with Spring AOP and Annotations

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.

Custom AnnotationJavaaspectj
0 likes · 16 min read
Implement Custom Logging with Spring AOP and Annotations
Top Architect
Top Architect
Nov 14, 2021 · Backend Development

Implementing a Request Logging Aspect with Spring AOP

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.

JavaRequest Loggingaop
0 likes · 12 min read
Implementing a Request Logging Aspect with Spring AOP
Top Architect
Top Architect
Oct 22, 2021 · Backend Development

Understanding AOP: AspectJ, Spring AOP, and CGLIB – A Practical Guide

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.

Javaaopaspectj
0 likes · 9 min read
Understanding AOP: AspectJ, Spring AOP, and CGLIB – A Practical Guide
Top Architect
Top Architect
Oct 6, 2021 · Backend Development

Understanding Spring AOP Proxy Creation and Common Pitfalls

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.

JavaProxyaop
0 likes · 4 min read
Understanding Spring AOP Proxy Creation and Common Pitfalls
Code Ape Tech Column
Code Ape Tech Column
Aug 9, 2021 · Backend Development

Why Your Custom AOP Annotation Fails in Spring Boot and How to Fix It

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.

Custom AnnotationProxySpring Boot
0 likes · 8 min read
Why Your Custom AOP Annotation Fails in Spring Boot and How to Fix It
ByteDance Dali Intelligent Technology Team
ByteDance Dali Intelligent Technology Team
Aug 5, 2021 · Mobile Development

Design and Implementation of a Lightweight Startup Information Collection and Visualization Framework

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.

AndroidProfilingPython
0 likes · 10 min read
Design and Implementation of a Lightweight Startup Information Collection and Visualization Framework
Top Architect
Top Architect
Jul 11, 2021 · Backend Development

Implementing Request Logging with Spring AOP: A Practical Guide

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.

Javaaopaspectj
0 likes · 12 min read
Implementing Request Logging with Spring AOP: A Practical Guide
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 25, 2021 · Backend Development

How Spring AOP Creates Proxies: Inside AnnotationAwareAspectJAutoProxyCreator

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.

Proxyaopaspectj
0 likes · 15 min read
How Spring AOP Creates Proxies: Inside AnnotationAwareAspectJAutoProxyCreator
Top Architect
Top Architect
Jun 16, 2021 · Backend Development

Implementing Request Logging with Spring AOP: Aspect Code and Best Practices

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.

JavaRequest Loggingaop
0 likes · 12 min read
Implementing Request Logging with Spring AOP: Aspect Code and Best Practices
Java Tech Enthusiast
Java Tech Enthusiast
Jun 8, 2021 · Backend Development

Introduction to AOP (Aspect Oriented Programming) in Java

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.

AdviceAspect Oriented ProgrammingDynamic Proxy
0 likes · 20 min read
Introduction to AOP (Aspect Oriented Programming) in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 18, 2020 · Backend Development

Optimizing Service Calls with ThreadLocal Cache and Custom Annotations in Java

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.

JavaThreadLocalannotations
0 likes · 9 min read
Optimizing Service Calls with ThreadLocal Cache and Custom Annotations in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jun 17, 2019 · Backend Development

Implementing AOP Logging in a Spring Boot Application

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.

JavaSpring Bootaop
0 likes · 4 min read
Implementing AOP Logging in a Spring Boot Application
Sohu Tech Products
Sohu Tech Products
May 29, 2019 · Mobile Development

Introduction to AspectJ for Android Development and Gradle Plugin Integration

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.

Androidaopaspectj
0 likes · 16 min read
Introduction to AspectJ for Android Development and Gradle Plugin Integration
NetEase Media Technology Team
NetEase Media Technology Team
May 20, 2019 · Mobile Development

Aspect-Oriented Programming (AOP) and Its Application in Android Client Development

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.

AndroidBytecode WeavingHot Fix
0 likes · 14 min read
Aspect-Oriented Programming (AOP) and Its Application in Android Client Development
Senior Brother's Insights
Senior Brother's Insights
Jan 1, 2019 · Backend Development

Deep Dive into Spring AOP: Core Classes, Annotation Processing, and Proxy Generation

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.

JDK Dynamic ProxyProxy GenerationSpring Boot
0 likes · 19 min read
Deep Dive into Spring AOP: Core Classes, Annotation Processing, and Proxy Generation
Programmer DD
Programmer DD
Jan 1, 2019 · Backend Development

Deep Dive into Spring AOP: Core Classes, Proxy Mechanics, and Source Code Walkthrough

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.

Backend DevelopmentJavaProxy
0 likes · 22 min read
Deep Dive into Spring AOP: Core Classes, Proxy Mechanics, and Source Code Walkthrough
Meituan Technology Team
Meituan Technology Team
Mar 29, 2018 · Mobile Development

Solving Android Toast Restrictions and Crash Issues

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.

AndroidCrashMobile Development
0 likes · 18 min read
Solving Android Toast Restrictions and Crash Issues
BiCaiJia Technology Team
BiCaiJia Technology Team
Sep 9, 2017 · Backend Development

Mastering Spring Boot AOP: Unified Web Request Logging Made Simple

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.

Spring BootWeb Loggingaop
0 likes · 14 min read
Mastering Spring Boot AOP: Unified Web Request Logging Made Simple
Art of Distributed System Architecture Design
Art of Distributed System Architecture Design
May 8, 2015 · Backend Development

Optimizing Data Fetching in J2EE Applications Using Lazy Loading, Fetch Strategies, and AspectJ

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.

Fetching StrategyORMaspectj
0 likes · 12 min read
Optimizing Data Fetching in J2EE Applications Using Lazy Loading, Fetch Strategies, and AspectJ