Tagged articles
BeanFactory
35 articles · Page 1 of 1
This article explains the distinction between Spring's BeanFactory and FactoryBean, covering their roles, core APIs, typical implementations, key differences in registration and retrieval, classic use cases, common pitfalls, and frequent interview follow‑up questions, with concrete code examples and comparison tables.
BeanFactoryFactoryBeanInterview
0 likes · 10 min read

The article explains how BeanFactory is a minimal, lazy‑loading container that only creates and caches beans, while ApplicationContext extends it with eager pre‑loading, full annotation, AOP, transaction, environment and event support, and outlines their respective use cases and pitfalls.
ApplicationContextBeanFactoryEager Loading
0 likes · 9 min read

This article presents ten highly valuable Spring Boot features—including global exception handling, MVC interceptors, programmatic bean access, @Import usage, startup runners, BeanDefinition modification, bean lifecycle callbacks, and custom scopes—each illustrated with concrete code examples and explanations for building cleaner, more maintainable Java backend applications.
BeanFactoryCommandLineRunnerCustom Scope
0 likes · 13 min read

This article breaks down Spring Boot's core refresh() method into twelve detailed steps, explaining how the IoC container prepares, configures, and starts up—including bean factory preparation, post‑processor registration, singleton instantiation, and final event publishing—providing interview‑ready insights and code illustrations.
BeanFactoryIoCSpring Boot
0 likes · 14 min read


java1234Mar 15, 2026 · Backend Development
This article compares Spring's BeanFactory and ApplicationContext, detailing their roles, loading strategies, feature sets, code examples, and recommended usage scenarios, helping developers choose the appropriate container for their projects.
ApplicationContextBeanFactoryIoC
0 likes · 6 min read

This article explains Spring's circular‑dependency problem, introduces the three‑level cache (singletonObjects, earlySingletonObjects, singletonFactories), walks through the full execution flow with code examples, and clarifies why each cache level and AOP proxy factories are essential for correct bean initialization.
AOPBeanFactoryCircular Dependency
0 likes · 12 min read

This article explains the complete Spring Bean lifecycle, breaks it down into six major phases and eleven detailed steps, describes how BeanFactory creates beans in four stages, and clearly distinguishes BeanFactoryPostProcessor from BeanPostProcessor with concrete examples and code snippets.
Bean LifecycleBeanFactoryJava
0 likes · 17 min read

This article walks through the ten most useful Spring extension points—including global exception handling, custom interceptors, bean access, @Import usage, startup runners, BeanDefinition modification, initialization callbacks, BeanPostProcessor hooks, destroy callbacks, and custom scopes—providing clear explanations and ready‑to‑use code examples for each.
BackendBeanFactoryBeanPostProcessor
0 likes · 17 min read

This tutorial explains why and how to dynamically change Spring bean implementations at runtime, presenting a real-world region‑service example and demonstrating two solutions—using BeanFactory and injecting a map of implementations—for flexible backend development.
BeanFactoryDynamic AutowiringSpring
0 likes · 5 min read

This article explains the distinct roles of Spring's BeanFactory and FactoryBean, compares their functionalities, outlines how to retrieve beans and FactoryBeans, and provides practical code examples and usage scenarios for creating complex objects within the Spring IoC container.
BeanFactoryFactoryBeanIoC
0 likes · 8 min read

This article explores the fundamental mechanisms of the Spring container, detailing its architecture, core jars, bean factory processes, configuration parsing, bean instantiation, property population, and design patterns such as Factory, Singleton, Builder, Decorator, Observer, and Strategy, while providing extensive code examples and diagrams.
BeanFactoryIoCSpring
0 likes · 52 min read

This article explains the core Spring IoC concepts by analyzing the top‑level BeanFactory interface and its three important sub‑interfaces—HierarchicalBeanFactory, ListableBeanFactory, and AutowireCapableBeanFactory—illustrating their responsibilities, inheritance relationships, and practical usage with code examples.
BeanFactoryIoCJava
0 likes · 8 min read

This article explains how Spring solves circular dependencies by using a three‑level cache system, walks through the underlying source‑code execution flow, clarifies the purpose of each cache level, and discusses why the design is essential for AOP‑enabled beans.
AOPBeanFactoryCircular Dependency
0 likes · 12 min read


LouZaiOct 7, 2023 · Backend Development
This article walks through Spring's three‑level cache mechanism and source‑code flow that break circular dependencies, illustrating each step with a concrete demo, explaining the role of AOP, and showing why each cache level is necessary.
AOPBeanFactoryCircular Dependency
0 likes · 14 min read

Spring determines the type of an injected property, resolves collection or single-bean dependencies, and then locates matching bean instances, handling Optional, ObjectFactory, ObjectProvider, and JSR‑330 providers, while supporting @Lazy proxies and various collection descriptors.
BeanFactoryJavaSpring
0 likes · 9 min read

This article walks through the twelve essential steps Spring performs during application startup, explaining each method—from prepareRefresh to finishRefresh—including bean factory preparation, post‑processor registration, and the final context refresh, all illustrated with diagrams and code snippets.
ApplicationContextBeanFactorySpring
0 likes · 16 min read

This article dissects the core bean creation logic of Spring's AbstractAutowireCapableBeanFactory, detailing how createBeanInstance delegates to obtainFromSupplier, instantiateUsingFactoryMethod, autowireConstructor, and fallback default constructors, while explaining the role of Supplier, ConstructorResolver, argument resolution, and caching mechanisms.
BeanFactoryConstructor InjectionJava
0 likes · 34 min read

This article provides an in‑depth walkthrough of how Spring resolves circular dependencies using its three‑level cache mechanism, complete with code examples, step‑by‑step execution flow, and a deep dive into why each cache level is essential.
AOPBeanFactoryCircular Dependency
0 likes · 14 min read

This article explains Spring's IoC container architecture, bean definition processing, lifecycle methods, and AOP proxy creation, providing detailed code examples and step‑by‑step descriptions of resource loading, bean instantiation, dependency injection, and interceptor chains.
AOPBeanFactoryDependencyInjection
0 likes · 12 min read

This article explains how Spring's BeanFactory creates and caches beans, details the three‑level cache mechanism (singleton, early‑singleton, and singleton‑factory) used to resolve circular dependencies, and walks through the relevant source code and lifecycle methods.
BackendBeanFactoryCaching
0 likes · 19 min read

This article explains how Spring's three‑level cache (singleton, early‑singleton, and singleton‑factory caches) works together with bean post‑processors to break circular dependencies and correctly create AOP proxies, while also showing how to disable circular references when needed.
AOPBackendBeanFactory
0 likes · 12 min read

This article walks through the fundamentals of Spring’s IoC container by manually implementing a lightweight version, covering concepts such as IOC, DI, bean definitions, resource loading, bean registration, and a simple BeanFactory with example code and a test demonstrating singleton caching.
BeanFactoryIoCJava
0 likes · 10 min read


转转QAMar 10, 2022 · Backend Development
The article describes a solution that automatically triggers interface test cases after a service deployment by listening to deployment‑success MQ messages, dynamically invoking TestNG with service‑specific IPs, and integrating Spring bean registration to simplify test code while handling dynamic nodes, reporting, and common pitfalls.
BeanFactoryJavaMQ
0 likes · 11 min read

This article provides a comprehensive overview of the design patterns used in Spring, including Simple Factory, Factory Method, Singleton, Adapter, Decorator, Proxy, Observer, Strategy, and Template Method, with explanations of their implementation, principles, and practical code examples.
BeanFactorySpringTemplate Method
0 likes · 13 min read

This article explains the core differences between Spring's BeanFactory and ApplicationContext, why ApplicationContext is generally preferred, and how to manually register BeanPostProcessors when using a plain DefaultListableBeanFactory.
ApplicationContextBeanFactoryIoC
0 likes · 6 min read

This article explains how Spring’s core container uses classic design patterns—Simple Factory via BeanFactory, Factory Method with FactoryBean, Singleton, Adapter, Decorator, Proxy, Observer, Strategy, and Template Method—illustrated with code snippets and diagrams to show their implementation and purpose within the framework.
BeanFactorySpringTemplate Method
0 likes · 15 min read

This article walks through Spring’s container initialization, detailing the refresh method, XML parsing, BeanDefinition creation and registration, and the role of post‑processors, providing a clear roadmap for readers to understand and remember the core IoC workflow.
BeanDefinitionBeanFactoryIoC
0 likes · 10 min read

This article provides a comprehensive overview of the design patterns used in the Spring framework—including Simple Factory, Factory Method, Singleton, Adapter, Decorator, Proxy, Observer, Strategy, and Template Method—explaining their implementation, underlying principles, and practical significance with code examples.
AdapterBeanFactoryDecorator
0 likes · 15 min read

Spring provides two IoC containers—BeanFactory and ApplicationContext—each with distinct loading strategies, features, and registration behaviors; this article demonstrates their differences through practical code examples, highlighting lazy versus eager loading, automatic post‑processor registration, and why ApplicationContext is generally preferred for enterprise applications.
ApplicationContextBeanFactoryIoC
0 likes · 9 min read

This article walks through the Spring Framework container startup process, explaining how the AnnotationConfigApplicationContext constructor prepares the environment, registers readers and scanners, initializes the BeanFactory, sets up condition evaluators and post‑processors, and outlines the default filters used for component scanning.
AnnotationConfigApplicationContextBeanFactoryJava
0 likes · 15 min read

This article explains how the Spring framework implements various classic design patterns—including Simple Factory, Factory Method, Singleton, Adapter, Decorator, Proxy, Observer, Strategy, and Template Method—detailing their implementation mechanisms, underlying principles, and practical significance within Spring's bean lifecycle and extension points.
AOPBeanFactorySpring
0 likes · 14 min read

This article explains the roles of BeanFactory and ApplicationContext in Spring, compares BeanFactory with FactoryBean, and provides detailed code examples showing how to configure and retrieve beans, including custom FactoryBean implementations and the use of '&' to access the FactoryBean itself.
BackendBeanFactoryFactoryBean
0 likes · 16 min read

This article compares Spring's BeanFactory and ApplicationContext, explaining their roles in retrieving beans, detailing lazy versus eager loading, providing Java and XML code examples, and offering guidance on when to choose each interface for efficient backend development.
ApplicationContextBeanFactoryJava
0 likes · 7 min read

This article provides an in‑depth exploration of Spring's core concepts—including the IOC container, ApplicationContext vs BeanFactory, bean instantiation lifecycles, and the role of FactoryBean—supplemented with diagrams and source code excerpts to help Java developers understand the framework's inner workings.
BackendBeanFactoryFactoryBean
0 likes · 16 min read

This article guides Java backend developers through the fundamentals of Spring IoC and DI, illustrating three practical learning routes—from simple BeanFactory containers to advanced ApplicationContext and WebApplicationContext implementations—using diagrams, code examples, and concise explanations to demystify the core container.
ApplicationContextBeanFactoryIoC
0 likes · 12 min read
