Tagged articles
64 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
Jul 13, 2025 · Backend Development

Static vs Dynamic Proxy in Java: When and How to Use Each

This article explains the differences between static and dynamic proxies in Java, demonstrates how to implement static proxies, JDK dynamic proxies, and CGLib proxies with complete code examples, and compares their advantages, limitations, and typical use cases in backend development.

Backend DevelopmentDynamic ProxyJDK
0 likes · 9 min read
Static vs Dynamic Proxy in Java: When and How to Use Each
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 30, 2024 · Backend Development

Which Java Bean Mapping Tool Is Fastest? Spring BeanUtils vs MapStruct vs Others

This article compares the performance of several Java bean‑mapping utilities—including Spring BeanUtils, Apache BeanUtils, Orika, Cglib BeanCopier, ModelMapper, MapStruct, and manual getter/setter code—by converting a sample Entity to a DTO 10,000 times and summarizing the results and best‑use recommendations.

Performance TestSpring Bootbean-mapping
0 likes · 10 min read
Which Java Bean Mapping Tool Is Fastest? Spring BeanUtils vs MapStruct vs Others
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Nov 5, 2024 · Backend Development

How CGLIB Powers Faster Java Dynamic Proxies – Inside FastClass and Bytecode Generation

This article explains CGLIB, a high‑performance bytecode library for creating Java dynamic proxies without interfaces, walks through implementation steps and core source‑code analysis, details the FastClass optimization that bypasses reflection, and compares CGLIB with JDK dynamic proxies.

Bytecode GenerationDynamic ProxyFastClass
0 likes · 22 min read
How CGLIB Powers Faster Java Dynamic Proxies – Inside FastClass and Bytecode Generation
Java Architect Essentials
Java Architect Essentials
Jul 1, 2024 · Backend Development

Pitfalls of Java Bean Property Copy Tools and Recommended Alternatives

This article explains why generic Java bean property copy utilities like Spring BeanUtils, Apache Commons BeanUtils, and CGLIB can cause runtime type conversion errors and performance issues, demonstrates the problems with code examples, and recommends using custom converters or IDE‑generated mapping code such as MapStruct for safe and efficient object transformation.

BackendBeanUtilsJava
0 likes · 8 min read
Pitfalls of Java Bean Property Copy Tools and Recommended Alternatives
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Apr 30, 2024 · Backend Development

Mastering Spring AOP: XML, Annotations, and ProxyFactoryBean Deep Dive

This article explains Spring AOP fundamentals, demonstrates XML‑based and annotation‑based configurations, and provides a comprehensive guide to using ProxyFactoryBean—including its properties, proxy‑interface and proxy‑class scenarios, CGLIB considerations, and wildcard interceptor matching—complete with runnable code examples.

ProxyFactoryBeanXMLannotations
0 likes · 9 min read
Mastering Spring AOP: XML, Annotations, and ProxyFactoryBean Deep Dive
Java Architect Essentials
Java Architect Essentials
Jan 8, 2024 · Backend Development

Using MapStruct for Efficient Java Bean Copying and Mapping

This article explains why manual property copying in Java is inefficient, compares several runtime bean‑copy utilities, and demonstrates how MapStruct provides a compile‑time, type‑safe, high‑performance solution for shallow and deep object mapping, including handling of collections and ignored fields.

JavaObject Copybean-mapping
0 likes · 13 min read
Using MapStruct for Efficient Java Bean Copying and Mapping
Top Architecture Tech Stack
Top Architecture Tech Stack
Nov 24, 2023 · Backend Development

Applying ASM Bytecode Manipulation in cglib and Fastjson

This article demonstrates how ASM is used to generate dynamic proxies with cglib and to create high‑performance JSON deserializers in Fastjson, providing code examples, explanation of the underlying bytecode generation, and practical tips for developers.

ASMDynamic ProxyJava
0 likes · 8 min read
Applying ASM Bytecode Manipulation in cglib and Fastjson
Architecture Digest
Architecture Digest
Aug 16, 2023 · Backend Development

Implementing Retry Mechanisms in Java: Manual Loops, Static Proxy, JDK Dynamic Proxy, CGLib, AOP, Spring Retry and Guava‑Retry

This article explains why retry mechanisms are essential for remote service calls, compares several implementation approaches—including manual loops, static and dynamic proxies, AOP, Spring Retry annotations, and Guava‑Retry—provides complete Java code examples, and discusses the advantages and drawbacks of each method.

GuavaJavaProxy
0 likes · 15 min read
Implementing Retry Mechanisms in Java: Manual Loops, Static Proxy, JDK Dynamic Proxy, CGLib, AOP, Spring Retry and Guava‑Retry
Architect
Architect
Aug 15, 2023 · Backend Development

Mastering Retry Strategies in Java: From Manual Loops to Spring Retry and Guava

This article walks through seven retry implementations for Java services—manual loops, static proxy, JDK dynamic proxy, CGLib proxy, custom AOP, Spring Retry annotations, and Guava‑retry—showing code examples, analyzing their pros and cons, and recommending the best fit for different project contexts.

GuavaProxyRetry
0 likes · 18 min read
Mastering Retry Strategies in Java: From Manual Loops to Spring Retry and Guava
Architect
Architect
Aug 9, 2023 · Backend Development

Dynamic Management of SpringBoot @Scheduled Tasks with SuperScheduled

This article explains how to enhance SpringBoot's native @Scheduled tasks with the spring-boot-starter-super-scheduled library, allowing dynamic creation, modification, and cancellation of scheduled jobs at runtime without altering existing annotations, and details the underlying implementation using BeanPostProcessor, CGLIB proxies, and a custom task manager.

Dynamic ManagementJavaScheduled Tasks
0 likes · 14 min read
Dynamic Management of SpringBoot @Scheduled Tasks with SuperScheduled
Java Interview Crash Guide
Java Interview Crash Guide
May 24, 2023 · Backend Development

Why Lombok’s Getter/Setter Breaks MyBatis and EasyExcel: Hidden Pitfalls Explained

This article explores how Lombok’s auto‑generated getter/setter methods can conflict with MyBatis property naming conventions and cause null values, examines the underlying reflection logic in MyBatis, and also reveals why the @Accessor(chain=true) annotation disrupts EasyExcel’s CGLIB‑based mapping, offering practical solutions.

GetterSetterJavaLombok
0 likes · 7 min read
Why Lombok’s Getter/Setter Breaks MyBatis and EasyExcel: Hidden Pitfalls Explained
Java Backend Technology
Java Backend Technology
Jan 5, 2023 · Backend Development

Why Java Bean Property Copy Tools Can Hide Dangerous Type Bugs

This article explains why using automatic property copy utilities like Spring BeanUtils, CGLIB BeanCopier, or MapStruct can lead to hidden type conversion errors in Java, compares their performance, demonstrates pitfalls with generic type erasure, and recommends writing explicit conversion classes to avoid runtime bugs.

BeanUtilsJavaProperty Mapping
0 likes · 9 min read
Why Java Bean Property Copy Tools Can Hide Dangerous Type Bugs
Programmer DD
Programmer DD
Oct 9, 2022 · Backend Development

Mastering Java Dynamic Proxies: JDK vs CGLIB Implementation and Pitfalls

This article explains the concepts, advantages, and limitations of Java's JDK dynamic proxy and CGLIB proxy, provides step‑by‑step code examples for user registration validation, compares their mechanisms, and summarizes when to choose each approach in real‑world applications.

Dynamic ProxyJDKJava
0 likes · 11 min read
Mastering Java Dynamic Proxies: JDK vs CGLIB Implementation and Pitfalls
Sanyou's Java Diary
Sanyou's Java Diary
Sep 29, 2022 · Backend Development

Java Dynamic Proxies Explained: From Static to ByteBuddy with Performance Tips

This article explores Java's proxy patterns, detailing static proxy implementation, various dynamic proxy techniques—including JDK, Cglib, Javassist, and ByteBuddy—providing code examples, performance comparisons, and practical guidance for integrating these proxies into backend development for cleaner, more flexible code.

ByteBuddyDynamic ProxyJDK
0 likes · 18 min read
Java Dynamic Proxies Explained: From Static to ByteBuddy with Performance Tips
Top Architect
Top Architect
Sep 24, 2022 · Backend Development

Understanding JDK and CGLIB Dynamic Proxies in Java

This article explains the principles, advantages, and implementation details of Java's JDK dynamic proxy and CGLIB proxy mechanisms, providing step‑by‑step code examples that demonstrate how to enhance method calls such as user registration with validation logic.

Backend DevelopmentDynamic ProxyJDK
0 likes · 11 min read
Understanding JDK and CGLIB Dynamic Proxies in Java
Top Architect
Top Architect
May 24, 2022 · Backend Development

SpringBoot Super Scheduled: Dynamic Management and Enhancement of @Scheduled Tasks

This article introduces the SpringBoot‑Super‑Scheduled starter, explains how it dynamically manages native @Scheduled tasks without code changes, shows quick integration steps, and details the underlying implementation—including configuration management, post‑processor interception, dynamic proxy chaining, and runtime task control—complete with code examples.

BackendDynamic Managementcglib
0 likes · 14 min read
SpringBoot Super Scheduled: Dynamic Management and Enhancement of @Scheduled Tasks
Java High-Performance Architecture
Java High-Performance Architecture
Apr 1, 2022 · Backend Development

How to Dynamically Manage Spring Boot Scheduled Tasks with Super‑Scheduled

This article introduces Super‑Scheduled, a Spring Boot starter that enhances native @Scheduled tasks by enabling dynamic runtime management, explains quick integration steps, and details the underlying implementation using configuration components, post‑processors, CGLIB proxies, and a flexible execution chain.

Dynamic ManagementScheduled Taskscglib
0 likes · 15 min read
How to Dynamically Manage Spring Boot Scheduled Tasks with Super‑Scheduled
Architecture Digest
Architecture Digest
Mar 16, 2022 · Backend Development

Spring Boot Super Scheduled: Dynamic Management and Enhancement of @Scheduled Tasks

This article introduces a Spring Boot starter that enhances native @Scheduled tasks with dynamic management capabilities, explains how to integrate the dependency, and details the underlying implementation using post‑processors, application runners, custom managers, and CGLIB‑based proxy chains to modify scheduling parameters at runtime.

Dynamic ManagementJavaScheduled Tasks
0 likes · 14 min read
Spring Boot Super Scheduled: Dynamic Management and Enhancement of @Scheduled Tasks
Top Architect
Top Architect
Dec 11, 2021 · Backend Development

Proxy vs. Decorator Patterns and DIY Spring AOP Implementation in Java

This article explains the proxy and decorator design patterns using a coffee analogy, provides complete Java code examples for static and dynamic proxies, discusses their differences, and shows how to implement a Spring‑like AOP mechanism with JDK InvocationHandler and cglib, while also warning about their limitations.

DecoratorDynamic ProxyJava
0 likes · 11 min read
Proxy vs. Decorator Patterns and DIY Spring AOP Implementation in Java
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
JavaEdge
JavaEdge
Sep 25, 2021 · Backend Development

Why Spring AOP Doesn’t Apply to ‘this’ Calls and How to Fix It

This article explains why Spring AOP proxies are not applied when a bean invokes its own methods via the this reference, compares JDK and CGLIB proxy mechanisms, and shows how to enable proxy exposure or use AopContext to achieve the desired AOP behavior.

JDKJavaProxy
0 likes · 5 min read
Why Spring AOP Doesn’t Apply to ‘this’ Calls and How to Fix It
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 29, 2021 · Backend Development

Why Your Custom Spring AOP Advisor Isn’t Triggered and How to Fix It

This article explains the behavior of Spring Boot’s @Configuration and @Import annotations, the reasons a custom PointcutAdvisor may not be applied when using JDK proxies, and provides two solutions—adding the @DS annotation to interface methods or forcing CGLIB proxying with proxyTargetClass=true—to ensure the advice executes correctly.

Custom AdvisorJDK ProxySpring Boot
0 likes · 10 min read
Why Your Custom Spring AOP Advisor Isn’t Triggered and How to Fix It
Top Architect
Top Architect
Jun 6, 2021 · Backend Development

Pitfalls of Java Property Copy Utilities and Safer Alternatives

This article examines the drawbacks of using Java property copy utilities such as Spring BeanUtils, CGLIB BeanCopier, and Apache Commons BeanUtils, demonstrates type‑conversion errors through code examples, compares their performance, and recommends defining explicit conversion classes or using MapStruct for safer, compile‑time‑checked mappings.

BeanUtilsJavacglib
0 likes · 7 min read
Pitfalls of Java Property Copy Utilities and Safer Alternatives
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 11, 2021 · Backend Development

Understanding Java Dynamic Proxy: Static vs Dynamic Proxy and Implementations with JDK, CGLIB, Javassist, and ASM

This article explains Java's proxy pattern, compares static and dynamic proxies, and provides detailed examples of JDK dynamic proxy, CGLIB, Javassist, and ASM implementations, highlighting their mechanisms, code samples, and practical considerations for backend development.

ASMBackendDesign Patterns
0 likes · 21 min read
Understanding Java Dynamic Proxy: Static vs Dynamic Proxy and Implementations with JDK, CGLIB, Javassist, and ASM
Java Captain
Java Captain
Apr 28, 2021 · Backend Development

Pitfalls of Using Property Copy Tools in Java and Recommended Practices

This article explains why using generic property copy utilities like Apache Commons BeanUtils, Spring BeanUtils, CGLIB BeanCopier, or MapStruct can lead to performance degradation, type‑conversion errors, and hidden bugs in Java applications, and recommends defining explicit conversion classes with IDE‑generated getters and setters for safer, compile‑time‑checked mappings.

BeanUtilsJavaProperty Mapping
0 likes · 9 min read
Pitfalls of Using Property Copy Tools in Java and Recommended Practices
Code Ape Tech Column
Code Ape Tech Column
Apr 26, 2021 · Backend Development

Why Bean Property Copy Tools Can Fail: Pitfalls, Performance, and Safer Alternatives

This article examines the hidden risks and performance drawbacks of Java bean property copy utilities such as Spring BeanUtils, CGLIB BeanCopier, and MapStruct, demonstrates concrete examples of type‑conversion errors, and recommends custom converters or IDE‑generated mapping code for reliable data transfer.

BeanUtilsJavaProperty Mapping
0 likes · 9 min read
Why Bean Property Copy Tools Can Fail: Pitfalls, Performance, and Safer Alternatives
FunTester
FunTester
Dec 29, 2020 · Fundamentals

Understanding Java Proxy Pattern: Static, JDK Dynamic, and CGLIB Proxies

This article explains the proxy design pattern in Java, demonstrates how to create static proxies, uses JDK dynamic proxies with InvocationHandler, and shows how CGLIB can generate class‑based proxies, highlighting their implementations, usage examples, and limitations.

Design PatternsDynamic ProxyJDK Proxy
0 likes · 8 min read
Understanding Java Proxy Pattern: Static, JDK Dynamic, and CGLIB Proxies
Top Architect
Top Architect
Oct 18, 2020 · Backend Development

Understanding Spring @Enable Annotation Logic and the Role of ConfigurationClassPostProcessor

This article explains how Spring's @Enable annotations are driven by @Import, walks through the entry points in spring.handlers, details the processing flow of ConfigurationClassPostProcessor, distinguishes full and lightweight configuration modes, and describes the CGLIB enhancement that ensures proper @Bean method semantics.

BeanDefinitionConfigurationClassPostProcessorJava
0 likes · 10 min read
Understanding Spring @Enable Annotation Logic and the Role of ConfigurationClassPostProcessor
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 16, 2020 · Backend Development

Understanding Java Proxy Pattern: Static vs Dynamic Proxies, JDK Proxy and CGLIB

This article explains the Java proxy pattern using a real‑world analogy, compares static and dynamic proxies, details implementations with JDK Proxy and CGLIB (including code samples), and discusses how dynamic proxies support the Open‑Closed principle and are applied in Spring AOP for transaction management.

Dynamic ProxyJDK ProxyJava
0 likes · 22 min read
Understanding Java Proxy Pattern: Static vs Dynamic Proxies, JDK Proxy and CGLIB
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 13, 2020 · Fundamentals

Understanding the Proxy Design Pattern in Java: Static, Dynamic, and CGLIB Implementations

This article explains the Proxy design pattern, covering its purpose, static, dynamic (JDK), and CGLIB implementations in Java, provides complete code examples, discusses advantages and disadvantages, and outlines typical use cases such as lazy initialization, access control, remote services, logging, and caching.

Design PatternsDynamic ProxyJava
0 likes · 14 min read
Understanding the Proxy Design Pattern in Java: Static, Dynamic, and CGLIB Implementations
Amap Tech
Amap Tech
May 8, 2020 · Backend Development

Common Java Coding Pitfalls and How to Avoid Them

These seven Java coding pitfalls—from improper object comparison and ternary‑operator null handling to generic type mismatches, BeanUtils copying errors, missing equals/hashCode, and CGLIB proxy issues—are explained with bytecode insights and concrete avoidance strategies such as consistent types, proper generics, correct overrides, and avoiding final members.

GenericsJavaObject Comparison
0 likes · 26 min read
Common Java Coding Pitfalls and How to Avoid Them
21CTO
21CTO
Apr 23, 2020 · Backend Development

Avoid These Hidden Java Pitfalls: Object Comparison, Generics, and CGLIB Proxy Gotchas

This article reveals common Java pitfalls—from using Objects.equals versus ==, ternary operator type conversion, generic type mismatches, Set deduplication, BeanUtils property copying, to CGLIB proxy quirks—and provides concrete analysis and practical avoidance techniques for each case.

CollectionsGenericsJava
0 likes · 28 min read
Avoid These Hidden Java Pitfalls: Object Comparison, Generics, and CGLIB Proxy Gotchas
Youku Technology
Youku Technology
Nov 7, 2019 · Backend Development

Bytecode‑Based Method Invocation for High‑Performance Java Middleware

The article presents a bytecode‑generation technique that creates dynamic wrapper classes to invoke arbitrary Java methods with near‑native speed, avoiding reflection’s overhead, and details the CallerWrap base, generator, and thread‑safe cache implementation that together enable high‑performance middleware calls.

JavaReflectionbytecode
0 likes · 11 min read
Bytecode‑Based Method Invocation for High‑Performance Java Middleware
Java Captain
Java Captain
Mar 6, 2019 · Backend Development

Understanding Spring Transaction Proxies: JDK Dynamic Proxy and CGLIB

This article explains how Spring implements declarative transaction management using proxies, compares JDK dynamic proxies and CGLIB, demonstrates their behavior with code examples, and clarifies which method modifiers support transactional annotations in Spring applications.

Backend DevelopmentJDK Dynamic ProxyJava
0 likes · 13 min read
Understanding Spring Transaction Proxies: JDK Dynamic Proxy and CGLIB
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
Java Backend Technology
Java Backend Technology
Sep 10, 2018 · Backend Development

JDK vs CGLib in Spring AOP: Which Proxy Is Faster?

This article explains the fundamentals of Spring AOP's JDK and CGLib dynamic proxies, compares their implementation details, presents performance test results across Java 1.6‑1.8, and offers practical guidance on choosing the appropriate proxy based on use‑case.

Dynamic ProxyJDK ProxyJava
0 likes · 7 min read
JDK vs CGLib in Spring AOP: Which Proxy Is Faster?
Java Captain
Java Captain
Apr 30, 2018 · Backend Development

Spring AOP Tutorial: Concepts, XML Configuration, and Sample Implementation

This article explains Aspect‑Oriented Programming (AOP) as a complement to OOP, introduces core AOP concepts such as aspects, join points, pointcuts, advice, weaving and introductions, and provides a step‑by‑step Spring XML configuration with Java code examples demonstrating time‑logging and logging aspects, ordering, selective pointcuts, and forced CGLIB proxy usage.

Aspect Oriented ProgrammingJavaXML Configuration
0 likes · 14 min read
Spring AOP Tutorial: Concepts, XML Configuration, and Sample Implementation
Java Captain
Java Captain
Apr 11, 2018 · Backend Development

Step‑by‑Step Guide to Spring AOP: Proxy Patterns, Static and Dynamic Proxies, and Practical Implementation

This article explains the fundamentals of Spring AOP by introducing proxy patterns, demonstrating static and dynamic proxy implementations with full Java code examples, and showing how Spring integrates JDK and CGLIB proxies through XML configuration for real‑world cross‑cutting concerns such as transactions and logging.

BackendDynamic ProxyJava
0 likes · 12 min read
Step‑by‑Step Guide to Spring AOP: Proxy Patterns, Static and Dynamic Proxies, and Practical Implementation
Java Captain
Java Captain
Nov 28, 2017 · Fundamentals

Proxy Pattern in Java: Static, Dynamic, and Cglib Implementations

This article explains the Proxy design pattern in Java, covering static proxy, dynamic JDK proxy, and Cglib subclass proxy with detailed code examples and discussion of their advantages, limitations, and typical usage in AOP frameworks.

Design PatternsDynamic ProxyProxy Pattern
0 likes · 10 min read
Proxy Pattern in Java: Static, Dynamic, and Cglib Implementations