This article introduces spring-smart-di, a library that extends Spring's @Autowired with @AutowiredProxySPI to dynamically switch service implementations (e.g., SMS providers) via configuration without restart, using proxies that resolve the active bean at each invocation.
This article explores Java's three core metaprogramming mechanisms—reflection, dynamic proxy, and MethodHandle—with code examples, API references, performance comparisons, and real-world usage in frameworks like Spring AOP, MyBatis, and RPC systems.
This article introduces the structural Proxy pattern, demonstrates three implementations—hand‑written static proxy, JDK dynamic proxy, and CGLIB subclass proxy—explains their mechanisms, trade‑offs, and limitations, and shows how Spring AOP selects between them for cross‑cutting concerns like logging, transactions, and caching.
This article walks through creating a minimal Java 17 RPC framework—from defining a simple binary protocol and using JDK serialization to implementing server loops, dynamic proxy‑based clients, and a runnable demo—while also highlighting the gaps that production‑grade solutions like Dubbo or gRPC must fill.
The article explains MyBatis’s three‑stage process—building an in‑memory mapping dictionary at startup, using JDK dynamic proxies to bind interface methods to that dictionary, and the runtime execution flow that translates a mapper call into JDBC operations, highlighting design choices such as builder chains, pre‑loading, and composition over inheritance.
This article introduces the Proxy design pattern, explains its core purpose of controlling access without modifying original classes, illustrates everyday analogies, provides a complete Java static‑proxy implementation with interface, real subject, proxy and test code, and summarizes common use cases and distinctions from decorators.
Spring’s BeanPostProcessor is a global container hook that intercepts every bean’s lifecycle, enabling custom initialization, dynamic proxying, annotation processing, and resource cleanup; the article explains its three-tier hierarchy, execution order, priority rules, practical use‑cases like auto‑injection, logging, data masking, and common pitfalls.
The article critiques Playwright’s limitations in real‑world web automation and introduces BrowserAct’s two free open‑source skills—browser‑act CLI and browser‑act‑skill‑forge—which provide a stealth browser, dynamic proxy, multi‑session handling, and a rich skill ecosystem to empower AI agents for robust, scalable browser automation.
This article analyzes why Java reflection incurs high latency due to repeated method lookups and security checks, presents benchmark data showing up to 500‑fold slowdown, and demonstrates how caching Method objects with JDK dynamic proxies can reduce overhead by up to eight times while offering practical code examples and usage tips.
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.
This article explains why remote procedure call (RPC) remains essential for microservice communication, detailing its historical roots, the limitations of HTTP, the multi‑step RPC workflow—including service discovery, serialization, network transmission, dynamic proxies, and governance—and how RPC and HTTP complement each other in modern architectures.
This article explains the principle of Nginx static‑dynamic separation, shows how to configure location blocks and caching for static assets, and demonstrates how proxying dynamic requests to backend servers can reduce response time from 200 ms to 50 ms, increasing QPS several‑fold.
The article starts by highlighting Xiaomi's competitive software developer salaries, then provides a detailed Java interview guide covering reflection fundamentals, static vs dynamic proxies, SPI vs API, synchronization behavior, Redis caching strategies, and JWT authentication, complete with code examples and practical comparisons.
The article dissects XXL-JOB's communication layer, showcasing Netty HTTP usage, a full asynchronous processing pipeline, dynamic proxy abstraction, request‑ID based thread wake‑up, and detailed Java code examples that illustrate how the scheduler and executor achieve high‑throughput remote job execution.
The article explains why MyBatis can execute database queries without concrete method implementations by using JDK dynamic proxies, detailing the roles of MapperProxy, MapperMethod, SqlSession and Executor, and walks through the four‑step process from proxy creation to result mapping.
This guide presents 18 practical Java reflection patterns—from obtaining Class objects to dynamic proxies, module system constraints, and performance optimizations—offering concrete code examples, common pitfalls, and best‑practice recommendations for safe and efficient use.
This article explains how xxl-job uses Netty HTTP as its communication backbone, hides network details with dynamic proxies, processes tasks asynchronously via queues, and synchronously retrieves results through future‑response mechanisms, all illustrated with code snippets and a flow diagram.
This article walks through various Java retry mechanisms—including manual loops, static and dynamic proxies, AOP, Spring Retry annotations, and Guava‑retry—explaining their implementations, advantages, drawbacks, and when to choose each approach for robust remote service calls.
This article explains how xxl-job employs Netty HTTP, dynamic proxy patterns, and fully asynchronous processing to achieve efficient remote procedure calls, detailing the communication layer, overall workflow, key design points, and the underlying Java code that synchronously retrieves results from asynchronous operations.
This article explains how xxl‑job uses Netty HTTP, dynamic proxies, and fully asynchronous processing to implement a high‑throughput RPC mechanism, detailing the communication layer, overall workflow, and the clever design that wraps async calls into synchronous‑looking code.
This article explains how xxl-job leverages Netty HTTP, dynamic proxy patterns, and fully asynchronous processing—including thread‑waiting mechanisms and UUID request IDs—to achieve efficient remote procedure calls, with detailed code examples illustrating the scheduler‑executor communication flow.
This guide explains how Nginx can separate static resources from dynamic content, outlines the underlying principle, and provides a complete configuration example that improves response time and concurrency by serving files directly and proxying application requests to backend servers.
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.
This article introduces the lightweight open‑source XXL‑Job framework, walks through server and executor setup, demonstrates three task creation methods, explains how to trigger and monitor jobs, and highlights the dynamic‑proxy and asynchronous design that enable high‑throughput distributed scheduling in Spring Boot applications.
The article explains the complete lifecycle of Java annotations, covering how the compiler represents them in the AST, how retention policies affect bytecode generation, how the JVM parses annotation attributes during class loading, and how dynamic proxy objects are created and used at runtime, with concrete Spring framework examples.
This article presents a comprehensive guide on building a highly modular Android network layer by leveraging Kotlin coroutines, Flow, Retrofit, annotation processors, dynamic proxies, and dependency‑injection frameworks to automatically generate Repository classes and streamline MVVM data flow.
This article provides a detailed walkthrough of EasyRules' source code, covering its modular project structure, the Facts container, Rule definition, registration via dynamic proxies, the two engine implementations, and the step‑by‑step fire process that drives rule evaluation and execution.
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.
This article explains MyBatis plugins’ core capabilities—SQL rewriting, logging, performance monitoring, transaction enhancement, and result handling—detailing their interception points, the Java dynamic‑proxy implementation, a complete pagination plugin example, typical application scenarios, and practical best‑practice recommendations for developers.
This article explains the difference between static and dynamic proxies in Java, walks through JDK dynamic‑proxy implementation steps, analyzes the underlying Proxy class generation process, and compares performance and usage with static proxies and CGLIB.
This article thoroughly explains OpenFeign’s core architecture, detailing its original Feign foundation, seven essential components, dynamic proxy generation, HTTP call execution flow, and how Spring Cloud seamlessly integrates and configures OpenFeign through annotations, factories, and property-based settings.
This article explains the Java Proxy design pattern, its three core roles, static and dynamic implementation approaches, provides a complete code example, and outlines typical scenarios where proxies improve access control, functionality, and system decoupling.
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.
This article explains the concept of dynamic proxies, compares Spring's JDK‑based and CGLIB‑based proxy implementations with code examples, and shows how they power Spring AOP for cross‑cutting concerns such as transactions and logging.
This article thoroughly explains OpenFeign’s core architecture, including its dynamic proxy mechanism, seven essential components, the process of building and executing HTTP calls, and how Spring Cloud integrates and configures OpenFeign through annotations, factories, and property settings.
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.
This guide explains how to set up high‑performance reverse proxy with OpenResty, covering both static resource routing and dynamic API forwarding, complete with Nginx configuration files for documentation, front‑end, Java and PHP back‑ends, and testing steps.
This article explains the principles behind Java dynamic proxies, demonstrates how to implement them using interfaces, InvocationHandler, and Proxy classes, and outlines common application scenarios such as logging, transaction management, and access control, helping developers extend object behavior at runtime.
This article explains the inner workings of JDK dynamic proxies, demonstrates a complete example with interface and handler implementations, dissects the Proxy class source code, clarifies why interfaces are mandatory, and shows alternative proxy creation techniques, providing a thorough understanding for Java developers.
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.
The article outlines five practical patterns—natural‑language DSL, streaming DSL, DSL‑guided generation, explicit retry, and dynamic proxying—that enable developers to treat large‑language‑model interactions as first‑class APIs, improving efficiency, accuracy, and user experience across diverse scenarios.
OpenFeign, originally Netflix Feign, provides a declarative way to perform remote service calls by generating dynamic proxy classes that translate interface methods into HTTP requests, and this article explains its origins, basic usage, annotation processing, and the detailed steps of its dynamic proxy creation.
This article explains the origins, usage, and internal dynamic‑proxy workflow of Spring Cloud OpenFeign, illustrating how FeignClient interfaces are scanned, annotated, and transformed into remote service calls through generated proxy classes, with code examples and diagrams.
This article explains the core principle of RPC using dynamic proxies, showing how interfaces are proxied at runtime, the code generation process, and compares JDK, Javassist, and Byte Buddy proxy implementations with practical examples.
This article introduces the EasyMock platform, outlines its key capabilities for service mocking, explains the technical challenges it solves, and provides a detailed step‑by‑step walkthrough of the JSF Mock implementation—including jar acquisition, JVM class loading, dynamic proxy creation, interface registration, client invocation, and parameter matching/return logic—accompanied by code examples.
This article introduces the EasyMock platform, explains its role in providing JSF and HTTP mock services for development and testing, outlines its architecture and capabilities, and details the step‑by‑step technical implementation of JSF Mock including jar downloading, JVM class loading, dynamic proxy creation, registration, client invocation, parameter matching, and response deserialization.
This article explains the differences between static and dynamic proxies in Java, provides complete code examples for static proxy, JDK native dynamic proxy, and CGLib dynamic proxy, shows their execution results, and compares their usage scenarios, especially in backend development.
This article explains the Proxy design pattern, covering its definition, use cases, static proxy implementation in Nacos, step‑by‑step guides for JDK dynamic proxies and Cglib dynamic proxies, and how Spring AOP leverages both approaches for method interception.
This article provides a comprehensive guide to MyBatis, covering its basic concepts, Maven dependency configuration, XML setup, entity and mapper definitions, execution flow using dynamic proxies, and a custom lightweight framework implementation with full Java code examples.
This article explains how to build a modular backend service in Java using domain‑driven design, configurable modules, dynamic proxies, cache adapters, lambda‑based query conditions, and Spring‑based conditional bean loading to enable flexible extensions without altering existing code.
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.
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.
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.
This article explains the fundamentals of remote procedure call (RPC), presents a complete system architecture diagram, and provides a step‑by‑step implementation of a custom rpc‑spring‑starter using Java, Spring, Zookeeper for service registration, Netty for network communication, and dynamic proxy techniques for client‑side invocation.
This article explains the proxy design pattern in Java, covering static proxy, JDK dynamic proxy, and CGLIB dynamic proxy implementations with code examples, diagrams, and a comparison of their advantages, limitations, and use‑case differences.
This article explores xxl-job’s underlying communication architecture, detailing how it employs Netty HTTP, dynamic proxy patterns, full asynchronous processing, and thread‑blocking mechanisms to achieve efficient remote procedure calls, accompanied by code examples and a visual activity diagram.
xxl-job uses Netty HTTP for communication, employing dynamic proxy patterns, full asynchronous processing, and thread‑blocking mechanisms to efficiently dispatch tasks from the scheduler to executors, with detailed code examples illustrating request IDs, future responses, and synchronized result retrieval.
This article explains how xxl-job implements its communication layer with Netty HTTP, outlines the overall workflow, and highlights key design choices such as dynamic proxy abstraction, full asynchronous processing, and request‑ID based thread synchronization, accompanied by detailed Java code examples.
This article explains the communication architecture of the XXL‑Job scheduler, detailing its Netty‑based transport layer, the overall task dispatch flow, and the clever design choices such as dynamic proxies, full asynchronous processing, and response wrapping that improve throughput and simplify remote calls.
This article explains how to create a custom MyBatis Interceptor using Java dynamic proxies, detailing the Interceptor interface, the plugin generation process, the wrap and invoke methods, and common use‑cases such as pagination, SQL analysis, encryption, and performance monitoring.
The article explains static and dynamic proxy patterns, demonstrates their Java implementations, and shows how Spring’s transaction management relies on dynamic AOP proxies—highlighting that internal calls within the same class bypass the proxy, preventing @Transactional methods from starting or rolling back transactions.
This article dissects the inner workings of OpenFeign within Spring Cloud, explaining how @EnableFeignClients triggers bean registration, how FeignClientsRegistrar and related configuration classes create BeanDefinitions, and how the FeignBuilder ultimately generates dynamic proxy instances for Feign clients.
This article presents a design pattern for a unified, annotation‑driven HTTP client in a Spring‑based payment system, detailing custom annotations, dynamic proxy enhancement, and bean registration via FactoryBean and ImportBeanDefinitionRegistrar, with complete code examples and a summary of key concepts.
This article explains how Spring Cloud OpenFeign simplifies remote service calls by using Java dynamic proxies, walks through its initialization process, annotation parsing, and shows concrete code examples that illustrate the creation of proxy objects and method handlers.
This article explains the fundamentals of Remote Procedure Call (RPC), detailing the definition, basic call flow, service interface design, server registration with Zookeeper, Netty-based network communication, dynamic proxy generation on the client side, and provides complete Java code examples for a working RPC framework.
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.
This article walks through the proxy and decorator design patterns using a coffee‑ordering example, compares their differences, explains how Spring AOP relies on proxy mechanisms, and demonstrates building a custom dynamic proxy for SMS cost tracking with JDK InvocationHandler and cglib.
This article walks through the complete lifecycle of Spring Cloud Feign in a Spring Boot 2.2.13 application, covering how to enable Feign, scan and register @FeignClient beans, inject them into controllers, create dynamic proxy instances, and finally execute remote calls with load‑balancing and Hystrix support.
This article explains the concept of proxy patterns, compares static and dynamic proxies in Java, provides detailed code examples for each, and discusses their advantages, disadvantages, and implementation steps, helping developers choose the appropriate proxy technique for their projects.
This article explains how SpringBoot injects HttpServletRequest into controllers using a JDK dynamic proxy and ThreadLocal storage, tracing the request object from the ObjectFactoryDelegatingInvocationHandler through RequestObjectFactory, RequestContextHolder, and the FrameworkServlet's processRequest lifecycle.
This article explains the differences between static and dynamic proxies in Java, details the role of Proxy, InvocationHandler, and the invoke method, and walks through the JDK dynamic proxy creation process with code examples and step‑by‑step analysis.
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.
This tutorial demonstrates how to create JavaBeans, DAO interfaces, and implementations, use JDK dynamic proxies to expose proxy classes, troubleshoot method‑level proxy failures, and apply Spring AOP with ProxyFactory or @Aspect, while also covering transaction pitfalls and best‑practice configurations.
This article explains the purpose of Spring's @Transactional annotation, how it leverages AOP and dynamic proxies to manage transactions, and walks through the core source‑code components—including BeanPostProcessor, advisors, TransactionInterceptor, and the transaction lifecycle—illustrated with concrete code examples.
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.
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.
This article explains the proxy pattern in Java, compares static and dynamic proxy implementations, provides complete code examples for JDK dynamic proxies, CGLIB, Javassist, and ASM proxies, and discusses their characteristics, performance considerations, and practical usage scenarios.
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.
This article introduces the concept of RPC (Remote Procedure Call), explains its underlying principles—including client workflow, dynamic proxies, serialization, network transmission, and server handling—provides Java code examples for both client and server sides, and summarizes key takeaways for building or understanding RPC frameworks.
This article explains MyBatis's logging architecture, covering the supported log implementations, the role of SLF4J, how MyBatis selects and configures a logger via LogFactory, and the use of JDK dynamic proxies to route JDBC logging through separate logger objects.
This article explains how MyBatis can instantiate a mapper interface without an implementation class by using a custom JDK dynamic proxy (referred to as "投鞭断流") that intercepts method calls, creates result objects, and demonstrates the full source code and execution output.
This article explains how a custom JDK dynamic proxy can automatically map interface methods to concrete objects, demonstrates the implementation with a User POJO and UserMapper, shows test output, analyzes MyBatis internal proxy classes, and clarifies why mapper methods cannot be overloaded.
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.
This article explains how Java’s dynamic proxy mechanism, dubbed “投鞭断流”, can be used to implement MyBatis’s automatic mapper functionality, providing step‑by‑step code examples for custom InvocationHandler, proxy creation, and discusses why method overloading is prohibited in mapper interfaces.
This article explains how to create a custom JDK dynamic proxy that automatically maps interface methods to objects, demonstrates the underlying MyBatis mapper implementation, and clarifies why method overloading is prohibited in mapper interfaces.
The article presents Sponsor, a lightweight ORM‑style wrapper for Android’s native SQLite that uses runtime annotations and dynamic proxies to generate Retrofit‑like, type‑safe CRUD APIs, automatically handling table creation, upgrades, and threading while keeping performance overhead negligible for SDK developers.
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.
This article explains the concepts, implementation mechanisms, performance considerations, and practical code examples of Java static and dynamic proxies, covering both JDK's proxy based on interfaces and CGLIB's subclass‑based proxy, and compares their suitable use cases.
This article explains Java's reflection mechanism, covering how to obtain Class objects, the java.lang.reflect API, practical code examples, common use cases such as dynamic proxies, JDBC driver loading, Spring bean initialization, and discusses the advantages and performance drawbacks of using reflection.
This article explains how a Java‑based instant‑messaging system was restructured by replacing raw HTTP calls with API packages, introducing dynamic proxies for transparent RPC, and simplifying the code to resemble local method invocations while improving maintainability and scalability.
This tutorial walks through creating a lightweight RPC system, illustrating how an order service can call a product service via dynamic proxies, socket communication, serialization, and service registration, while showing Maven module setup, API design, and concrete code examples for each component.
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.
This tutorial explains how to use CGLIB to create Java dynamic proxies, compares it with JDK proxies, shows step‑by‑step code examples, and demonstrates how to inspect generated classes via decompilation.
This article explains the proxy design pattern, shows how to implement static proxies in Java with concrete code examples, discusses their limitations, and then demonstrates JDK dynamic proxies using InvocationHandler and Proxy classes, including generated proxy class details.
This article explains how JDK and CGLib dynamic proxies work in Java, provides complete implementation examples, compares their mechanisms, usage scenarios in Spring, and discusses performance differences across JDK versions.
This guide walks through designing a Java RPC framework from the user's viewpoint, covering interface definition, client stub generation with dynamic proxies, flexible protocol and service discovery layers, server request handling, and key implementation steps, illustrated with diagrams and code snippets.
ARetrofit is an Android routing framework that enables concise, component‑to‑component communication by generating compile‑time route metadata via annotation processing, injecting bytecode with the Transform API, creating service proxies through dynamic proxies, and applying an OkHttp‑style interceptor chain for flexible, cross‑module extensions.
This article explains static and dynamic proxy patterns in Java, demonstrates how to use them for recording service response times, and shows how MyBatis leverages dynamic proxies to generate mapper implementations, complete with UML diagrams and sample code.
This article explains the concept of Remote Procedure Call (RPC), why distributed systems need remote invocation, the roles of provider, consumer and registry, essential technologies such as dynamic proxies, serialization and NIO, and introduces popular open‑source Java RPC frameworks.
This article explains the core concepts of Spring AOP, the proxy design pattern, and provides detailed Java examples of static proxy, JDK dynamic proxy, and CGLIB dynamic proxy, helping readers answer common interview questions and understand how Spring chooses the appropriate proxy implementation.