Tag

JDK Proxy

1 views collected around this technical thread.

Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 28, 2024 · Backend Development

Mastering Spring AOP Proxy Mechanisms: JDK vs CGLIB and Configuration Tips

This article explains how Spring AOP creates proxies using JDK dynamic proxies or CGLIB, outlines the limitations of each approach, and shows multiple ways—including XML, YAML, and annotations—to force CGLIB usage and resolve self‑invocation issues in Spring Boot applications.

AOPCGLIBJDK Proxy
0 likes · 8 min read
Mastering Spring AOP Proxy Mechanisms: JDK vs CGLIB and Configuration Tips
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.

AOPAnnotationsCGLIB
0 likes · 10 min read
Why Your Custom Spring AOP Advisor Isn’t Triggered and How to Fix It
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.

CGLIBDynamic ProxyJDK Proxy
0 likes · 8 min read
Understanding Java Proxy Pattern: Static, JDK Dynamic, and CGLIB Proxies
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Dec 6, 2020 · Fundamentals

Understanding the Proxy Pattern: Static and Dynamic Proxies in Java

This article explains the GoF Proxy pattern, illustrates static proxy implementation, and details both JDK dynamic proxy and cglib dynamic proxy techniques in Java with complete code examples and a comparison of their characteristics and usage scenarios.

CGLIBDynamic ProxyJDK Proxy
0 likes · 8 min read
Understanding the Proxy Pattern: Static and Dynamic Proxies in Java
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.

CGLIBDynamic ProxyJDK Proxy
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
Mar 30, 2020 · Backend Development

Understanding MyBatis Dynamic Proxy: How Mapper Interfaces Are Implemented

This article explains the core principle of MyBatis by demonstrating how Mapper interfaces are turned into dynamic proxy objects using JDK proxy mechanisms, walks through manual simulation code, and clarifies each step of the proxy creation and method invocation process.

Dynamic ProxyJDK ProxyJava
0 likes · 7 min read
Understanding MyBatis Dynamic Proxy: How Mapper Interfaces Are Implemented