Tagged articles
Bean Lifecycle
75 articles · Page 1 of 1
This article explains Spring's three-level cache mechanism that resolves circular dependencies for field/setter injection, why constructor injection fails with BeanCurrentlyInCreationException, how early exposure and ObjectFactory enable AOP proxy creation, and the impact of Spring Boot 2.6's default circular reference blocking.
AOPBean LifecycleCircular Dependency
0 likes · 14 min read

This comprehensive guide covers Spring Framework 6.x and Spring Boot 3.x internals, including version migration, IoC/DI mechanisms, AOP proxy creation, bean lifecycle, circular dependency resolution, Spring MVC request processing, transaction management, auto-configuration, AOT compilation, and a structured learning roadmap with best practices.
AOPAOT CompilationAuto-configuration
0 likes · 56 min read

Spring resolves singleton circular dependencies by using a three‑level cache—singletonObjects, earlySingletonObjects, and singletonFactories—to expose early bean references and generate AOP proxies on demand, avoiding the loss of proxies that occurs with a two‑level cache while preserving performance.
AOP ProxyBackendBean Lifecycle
0 likes · 19 min read

The article provides a step‑by‑step analysis of Spring AOP’s proxy creation process, explaining why some beans are proxied, how @Order, @EnableAspectJAutoProxy, proxyTargetClass and exposeProxy affect proxying, the differences between JDK and CGLIB proxies, and why private, static or final methods cannot be intercepted.
AOPAspectJBean Lifecycle
0 likes · 15 min read

This article dissects Spring’s singleton bean creation process, explaining the three‑level cache system, the doGetBean and doCreateBean workflows, circular‑dependency handling, proxy generation timing, and common pitfalls such as multithreaded duplicate creation and hot‑deployment cache issues.
Bean LifecycleCacheCircular Dependency
0 likes · 11 min read

The article explains Spring’s three kinds of circular dependencies, the role of the first, second, and third‑level caches in the DefaultSingletonBeanRegistry, how the third‑level cache works with AOP proxies, why constructor injection cannot be solved, the @Lazy workaround, and the hidden bugs and best‑practice recommendations.
AOPBean LifecycleCircular Dependency
0 likes · 12 min read

This article walks through the complete Spring Bean lifecycle—covering scanning, instantiation, dependency injection, initialization, AOP proxy creation, and destruction—while highlighting common pitfalls, the differences for prototype and lazy‑loaded beans, and practical debugging tips.
AOPBean LifecyclePrototype Bean
0 likes · 10 min read

The article explains Spring's three‑level cache mechanism, shows how the second‑level cache alone can break simple circular dependencies, and details why the third‑level cache is introduced to lazily create AOP proxies without violating the bean lifecycle.
AOPBean LifecycleCircular Dependency
0 likes · 9 min read

The article explains that Spring's second‑level cache can resolve simple circular dependencies, but a third‑level cache is introduced to handle cases involving AOP proxies, allowing delayed proxy creation without breaking the bean lifecycle.
AOPBean LifecycleCircular Dependency
0 likes · 10 min read

Spring’s bean factory uses a three‑level cache—singletonObjects, earlySingletonObjects, and singletonFactories—to handle circular dependencies, but only the third level is needed when AOP proxies are involved, allowing lazy proxy creation without breaking the standard bean lifecycle.
AOPBean LifecycleCircular Dependency
0 likes · 9 min read

The final installment of the Spring Boot source‑code series consolidates the previous six episodes—covering startup flow, auto‑configuration, IoC container, bean lifecycle, circular dependencies, and SPI—while providing a complete knowledge map, 20 interview‑question templates, practical study tips, and a roadmap for further learning and contribution.
Auto-configurationBean LifecycleConfiguration
0 likes · 14 min read

This article walks through Spring Boot's bean creation pipeline—from the initial getBean call through doGetBean, the three‑level singleton cache, and the detailed steps of createBean, populateBean, and initializeBean—explaining how circular dependencies are safely resolved and where AOP proxies are generated.
@BeanAOPBean Lifecycle
0 likes · 14 min read

This article breaks down Spring's bean lifecycle, explaining the minimal creation steps, the role of BeanFactoryPostProcessor and BeanPostProcessor, how Spring resolves bean references, handles circular dependencies with three‑level caches, and clarifies common misconceptions about proxy generation.
Bean LifecycleCircular DependencySpring
0 likes · 14 min read

Most Spring Boot developers use @Service, @Component and @Autowired daily, yet few understand the ten‑step lifecycle a bean undergoes—from loading its definition to destruction—information that unlocks advanced features such as custom initialization, AOP, and dynamic proxy creation.
Bean LifecycleBeanPostProcessorDisposableBean
0 likes · 7 min read


Java OneDec 13, 2025 · Backend Development
This guide explains the Spring bean lifecycle, focusing on the key initialization and destruction hook methods using @PostConstruct and @PreDestroy annotations, with code examples, usage tips, and important considerations for prototype-scoped beans.
Bean LifecycleJavaPostConstruct
0 likes · 4 min read

This concise guide explains Spring’s core concepts—including the Inversion of Control container, how beans are created and managed, the different bean scopes, and the full bean lifecycle with key extension points—providing clear analogies and practical configuration examples.
Bean LifecycleBean ScopeIoC
0 likes · 6 min read

This article explains the purpose and usage of Spring Boot’s @PostConstruct and @PreDestroy annotations for bean initialization and cleanup, discusses their migration to Jakarta EE in Spring Boot 3+, and presents modern alternatives such as @EventListener with ApplicationReadyEvent, DisposableBean, and destroyMethod configurations, complete with code examples.
Bean LifecycleJavaPostConstruct
0 likes · 8 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

Explore Spring’s extensibility by mastering global exception handling with @RestControllerAdvice, creating custom MVC interceptors, accessing the container via BeanFactoryAware, importing configurations, adding startup logic, modifying BeanDefinitions, using initialization callbacks, and defining a thread‑local custom scope for per‑thread bean instances.
ApplicationRunnerBean LifecycleCustom Scope
0 likes · 10 min read

This article explains Spring's bean lifecycle in depth, covering the minimal creation steps, the role of BeanFactoryPostProcessor and BeanPostProcessor, how Spring resolves references and circular dependencies, and why a three‑level cache is essential for reliable dependency injection.
Bean LifecycleSpringThree-Level Cache
0 likes · 15 min read

This article explains what circular dependencies are in Spring, how the framework detects them using a three‑level cache during bean creation, and walks through a step‑by‑step example of resolving a setter‑injected circular reference between two beans.
Bean LifecycleCircular DependencySpring
0 likes · 6 min read

This article systematically breaks down the eight most common design patterns used inside the Spring framework, explains how the template pattern powers bean lifecycle, compares classic and Spring‑specific implementations, and provides concrete code examples and step‑by‑step walkthroughs to help you ace interview questions.
Bean LifecycleJavaSpring
0 likes · 48 min read

This guide walks through ten crucial Spring Boot extension points—including global exception handling, custom interceptors, container access, configuration imports, startup runners, bean definition tweaks, initialization hooks, bean post‑processing, graceful shutdown, and custom scopes—providing clear explanations and ready‑to‑use code samples for building resilient backend services.
Bean LifecycleCustom ScopeException Handling
0 likes · 15 min read

This article walks through a real‑world case where adding a new JAR triggers a java.lang.StackOverflowError during Spring application startup, explains how hidden recursive calls in bean initialization cause the overflow, and offers debugging steps and a design‑level fix to prevent the issue.
Bean LifecycleDebuggingStackOverflowError
0 likes · 29 min read

The article explains Spring's three-level cache design—including singletonObjects, earlySingletonObjects, and singletonFactories—how it resolves circular bean dependencies, enables lazy initialization and proxy creation, outlines the workflow, and discusses its limitations and practical solutions.
Bean LifecycleCircular DependencySpring
0 likes · 7 min read

This article walks through every extensible hook in Spring and Spring Boot—from container refresh and ApplicationContextInitializer to BeanFactoryPostProcessor, InstantiationAwareBeanPostProcessor, SmartInitializingSingleton, and more—showing when each runs, how to implement it, and practical code examples for Java developers.
Bean LifecycleSpring BootSpring Framework
0 likes · 18 min read

This article explains Spring Boot 3 bean destruction techniques—including DisposableBean, @PreDestroy, @Bean destroyMethod, AutoCloseable, and custom inference—provides complete code examples, and announces a continuously updated Spring Boot 3 case collection PDF for developers.
AutoCloseableBean LifecycleDisposableBean
0 likes · 7 min read

This article provides a comprehensive overview of Spring and Spring Boot's extensible interfaces, detailing each extension point, its lifecycle stage, usage scenarios, and sample code, enabling developers to better understand and customize bean initialization within the backend framework.
Bean LifecycleJavaSpring
0 likes · 23 min read

This article explains the Spring container's refresh process, details every extensible hook in a bean's lifecycle—from ApplicationContextInitializer to DisposableBean—provides usage scenarios, and includes complete Java code snippets illustrating how to implement each extension point for custom middleware and application development.
Bean LifecycleJavaSpring
0 likes · 18 min read

This article compiles twelve advanced Spring interview questions covering bean initialization and lifecycle, AOP implementation, transaction management, the differences between ApplicationContext and BeanFactory, type conversion mechanisms, dependency injection, circular dependency resolution with three‑level caches, the event system, @Transactional and @Async annotations, and the inner workings of DispatcherServlet.
AOPBean LifecycleJava
0 likes · 21 min read

This article explains how Spring's bean lifecycle uses a three‑level cache (singletonObjects, earlySingletonObjects, singletonFactories) to break circular dependencies, especially when AOP proxies are involved, and why a two‑level cache alone cannot guarantee correct singleton behavior.
AOPBean LifecycleCircular Dependency
0 likes · 10 min read

This article walks through the eight critical phases of a Spring bean's lifecycle—from instantiation and property population to initialization, post‑processor hooks, usage, and destruction—detailing how Spring creates, configures, enhances, and finally disposes of beans, with code snippets and diagrams for clarity.
Bean LifecycleJavaSpring
0 likes · 5 min read

This article systematically catalogs every Spring and Spring Boot extension interface—from ApplicationContextInitializer to DisposableBean—illustrates their invocation order with a diagram, explains practical use‑cases, and provides concrete code samples for each hook, enabling developers to tap into the bean lifecycle for custom initialization, monitoring, and cleanup.
BackendBean LifecycleJava
0 likes · 20 min read

This article provides a deep technical analysis of Spring Boot's startup process, explains every relevant extension point, demonstrates how to log and verify execution order with sample code, answers eleven common questions about bean initialization, and offers practical guidance on when to safely open RPC, MQ, and HTTP traffic.
@AutowiredBean LifecycleCommandLineRunner
0 likes · 17 min read

This article walks through Spring 6.1.2’s bean creation lifecycle, from the refresh entry point to property population, initialization, and disposable bean registration, illustrating each step with concise code examples and detailed explanations.
Bean LifecycleJavaSpring
0 likes · 10 min read

This article provides a comprehensive analysis of Spring's @Autowired annotation, covering its usage, the bean lifecycle stages where it operates, the core classes and methods that implement it, and a comparison with other injection annotations such as @Resource, all illustrated with runnable code examples.
@AutowiredAnnotation ProcessingBean Lifecycle
0 likes · 27 min read

This article explains how to control Spring bean initialization and destruction using interfaces and annotations, inject prototype beans into singleton controllers, implement various BeanPostProcessor extensions, dynamically register beans, use @Import, Runner interfaces, global exception handling, custom type conversion, BeanFactoryAware, web interceptors, and default AOP proxy creation.
Bean LifecycleJavaSpring Boot
0 likes · 9 min read

This article enumerates and explains sixteen Spring and SpringBoot extension interfaces, illustrates their positions in the bean lifecycle with a call‑order diagram, and provides concrete usage scenarios and code samples so developers can harness these hooks to write more elegant and maintainable applications.
BackendBean LifecycleSpring
0 likes · 19 min read

This article provides a detailed exploration of Spring and Spring Boot's extensible interfaces, illustrating the complete bean lifecycle, presenting an invocation order diagram, and offering practical code examples for each extension point such as ApplicationContextInitializer, BeanFactoryPostProcessor, SmartInstantiationAwareBeanPostProcessor, and more, enabling developers to customize container behavior effectively.
Bean LifecycleJavaSpring
0 likes · 17 min read

The article explains Spring's three‑level cache mechanism for resolving singleton circular bean dependencies, walks through bean lifecycle stages, compares field, setter and constructor injection, shows configuration to enable circular references, and details the internal code paths that expose early bean references.
Bean LifecycleCircular DependencySpring
0 likes · 17 min read

This article explains the complete lifecycle of a Spring bean—including creation, merged BeanDefinition processing, factory exposure, property population, initialization, and destruction—while illustrating the underlying source‑code mechanisms and how Spring resolves constructors, handles circular dependencies, and integrates AOP and post‑processors.
BackendBean LifecycleJava
0 likes · 16 min read

This article walks through every stage of a Spring Bean's lifecycle—including instantiation, property population, initialization callbacks, usage, and destruction—while providing concrete code examples, execution traces, and an analysis of the underlying Spring source methods.
Bean LifecycleBeanPostProcessorIoC
0 likes · 13 min read

This article explains Spring's core post‑processor extension points—BeanDefinitionRegistryPostProcessor, BeanFactoryPostProcessor, and BeanPostProcessor—detailing their purpose, execution order, concrete code examples, and how they fit into the bean lifecycle, including advanced interfaces like InstantiationAwareBeanPostProcessor.
Bean LifecycleJavaSpring
0 likes · 14 min read

This article explains the complete Spring bean lifecycle—including creation, property filling, initialization, usage, and destruction—detailing how Spring manages object creation, dependency injection, AOP proxy generation, and lifecycle callbacks through various internal phases and extension points.
AOPBean LifecycleJava
0 likes · 15 min read

This article explains the core concepts of the Spring framework—including its container, bean definition readers, bean factories, and three‑level cache mechanism—while detailing how Spring resolves circular dependencies and integrates AOP during bean creation.
AOPBean LifecycleJava
0 likes · 8 min read

This article provides a detailed walkthrough of Spring and Spring Boot's bean lifecycle, explaining each extension point—from ApplicationContextInitializer to CommandLineRunner—illustrating their usage with code examples and describing practical scenarios for customizing bean creation, initialization, and destruction.
Bean LifecycleJavaSpring
0 likes · 17 min read

This article explains the complete Spring Bean lifecycle—including IoC fundamentals, bean creation, property injection, initialization callbacks, custom init/destroy methods, and post‑processor hooks—by walking through detailed source‑code examples and step‑by‑step execution traces for a sample bean.
Bean LifecycleIoCJava
0 likes · 10 min read

This article provides a comprehensive overview of Spring and Spring Boot's extension points, detailing each lifecycle hook, its purpose, typical use cases, and sample implementations, enabling developers to customize bean initialization, configuration, and shutdown processes with concrete code examples.
Bean LifecycleSpring Bootbackend development
0 likes · 19 min read

This article explains the Spring Bean lifecycle in depth, covering IoC fundamentals, each lifecycle stage, extension points such as Aware interfaces and BeanPostProcessor, and provides a step‑by‑step code walkthrough that maps the execution flow from bean creation to destruction.
BackendBean LifecycleIoC
0 likes · 12 min read

This article explains what circular dependencies are in Spring, describes the three‑level cache mechanism (singletonObjects, earlySingletonObjects, singletonFactories), shows how it resolves singleton bean cycles, and outlines scenarios where the cache cannot break the dependency, such as constructor injection and prototype beans.
Bean LifecycleCircular DependencySpring
0 likes · 14 min read

This article walks through the complete Spring Bean lifecycle, explaining how the IoC container creates, initializes (including Aware callbacks, BeanPostProcessor hooks, and custom init methods) and finally destroys beans, with detailed code examples and source‑code analysis.
Bean LifecycleIoCJava
0 likes · 18 min read

This article explains Spring's bean lifecycle, detailing how the framework resolves circular dependencies using a three‑level cache (singletonObjects, earlySingletonObjects, singletonFactories), and why a two‑level cache is insufficient, especially when AOP proxies are involved.
AOPBean LifecycleCircular Dependency
0 likes · 8 min read

This article explains Spring's bean lifecycle, the three‑level cache mechanism (singletonObjects, earlySingletonObjects, singletonFactories) used to break circular dependencies, the role of Aware interfaces and BeanPostProcessor, and why a second‑level cache is essential when AOP proxies are involved.
AOPBean LifecycleCircular Dependency
0 likes · 9 min read

This article provides a comprehensive analysis of Spring's bean lifecycle, detailing the refresh method steps, post‑processor ordering, bean creation, dependency injection via @Autowired and @Resource, Aware callbacks, and initialization hooks such as @PostConstruct and init‑method.
Bean LifecycleJavaSpring
0 likes · 24 min read

This article explains how Spring's bean lifecycle and its three-level caching mechanism—singletonObjects, earlySingletonObjects, and singletonFactories—work together to resolve circular dependencies, especially when AOP proxies are involved, highlighting why a three‑cache approach is necessary.
AOPBean LifecycleCircular Dependency
0 likes · 9 min read


政采云技术Dec 14, 2021 · Backend Development
This article analyzes a Spring Boot startup failure caused by a conflict between @Autowired and @DubboReference annotations when injecting the same service bean, explaining the underlying mechanism and providing solutions.
@AutowiredBean LifecycleDubbo
0 likes · 15 min read

This article provides a comprehensive overview of the Spring Framework, covering its definition, advantages, core features such as IoC, AOP, MVC, transaction management, the various modules and their purposes, configuration methods (XML, annotations, Java API), bean scopes, lifecycle, autowiring, and key annotations used in modern Java backend development.
AnnotationsBean LifecycleIoC
0 likes · 14 min read

This comprehensive guide explores the Spring framework’s fundamentals, including its lightweight architecture, core IoC container, dependency injection mechanisms, bean scopes and lifecycle, annotation‑based configuration, data‑access support, and aspect‑oriented programming features, providing developers with a solid foundation for building robust Java applications.
AOPBean LifecycleIoC
0 likes · 45 min read

This article walks through the Spring 5.3.3 bean creation process, detailing how the DefaultListableBeanFactory and AnnotationConfigApplicationContext initialize singleton beans, resolve bean definitions, apply post‑processors, handle AOP proxy generation, and complete bean initialization with aware interfaces and custom init methods.
Bean Lifecycle
0 likes · 15 min read

This article explains how Spring 5.0 reads configuration and annotations, manages bean lifecycles, utilizes BeanPostProcessor extensions, addresses key issues such as FactoryBean vs BeanFactory and circular dependencies, and provides sample code to demonstrate these concepts.
Bean LifecycleBeanPostProcessorJava
0 likes · 12 min read

This article provides a detailed summary of Spring and Spring Boot's bean lifecycle, enumerating all major extension interfaces—including ApplicationContextInitializer, BeanDefinitionRegistryPostProcessor, BeanFactoryPostProcessor, InstantiationAwareBeanPostProcessor, SmartInstantiationAwareBeanPostProcessor, various Aware interfaces, FactoryBean, CommandLineRunner, and ApplicationListener—along with usage scenarios and code examples, enabling developers to customize bean initialization and container behavior.
Bean LifecycleSpringBootapplication-context
0 likes · 19 min read

This article explains what a circular dependency is in Spring, outlines the conditions under which Spring can resolve such cycles, and details the three‑level cache mechanism that enables bean creation, property injection, and AOP proxy handling to break the loop.
Bean LifecycleCircular DependencyJava
0 likes · 11 min read

This article provides comprehensive explanations of Spring framework concepts—including IoC/AOP principles, bean lifecycle, circular dependency resolution, transaction pitfalls, annotation configuration, MVC processing flow, advice types, and thread‑safety mechanisms—along with illustrative code snippets for interview preparation.
AOPBean Lifecycledependency-injection
0 likes · 12 min read

This article explains the core interfaces of the Spring Framework, such as BeanDefinition, BeanFactory, ApplicationContext, and BeanPostProcessor, and walks through the bean creation process—including refresh, preInstantiateSingletons, getBean, and the three‑level singleton caches—providing detailed code examples and insights into how Spring resolves circular dependencies.
Bean LifecycleJavaSpring
0 likes · 28 min read

This article explains Spring's circular dependency problem, the conditions under which it can be resolved, and how Spring's three‑level cache—combined with AOP proxy handling—enables beans to reference each other without causing creation failures, providing a comprehensive answer for interview scenarios.
AOPBean LifecycleCircular Dependency
0 likes · 18 min read

This article explains what circular dependency means in Spring, the conditions under which it can be resolved, and walks through the three‑level cache mechanism—including simple cases and AOP‑enhanced scenarios—providing code examples, diagrams, and a clear summary for interview preparation.
AOPBean LifecycleCircular Dependency
0 likes · 19 min read

This article explains how Spring's bean lifecycle can be customized using BeanPostProcessor, @PostConstruct, InitializingBean, and initMethod, providing code examples, execution logs, and best‑practice scenarios for extending bean creation and initialization in backend Java applications.
Bean LifecycleBeanPostProcessorInitializingBean
0 likes · 8 min read

This article explains the Spring bean lifecycle within an ApplicationContext, detailing container‑level, factory‑level, and bean‑level post‑processors, showing how to implement and register custom processors, and providing code examples and XML configuration to illustrate the execution order and practical usage.
ApplicationContextBackendBean Lifecycle
0 likes · 9 min read

This article investigates why @Configuration classes imported via @Import in a Spring Boot Dubbo starter fail to inject @Value properties and execute @PostConstruct, tracing the issue to early bean creation by a FactoryBean and offering practical work‑arounds.
Bean LifecycleConfigurationDubbo
0 likes · 8 min read

This article provides a comprehensive walkthrough of the Spring Bean lifecycle, covering bean retrieval, creation, property population, initialization, and destruction, illustrated with flowcharts and extensive Java code snippets from the AbstractBeanFactory and AbstractAutowireCapableBeanFactory classes.
Bean LifecycleJavadependency-injection
0 likes · 12 min read

This article provides a comprehensive, step‑by‑step walkthrough of Spring's Bean lifecycle—including bean retrieval, creation, property population, initialization, and destruction—illustrated with flowcharts and complete Java code snippets to help developers understand the inner workings of the framework.
Bean LifecycleJavaSpring Framework
0 likes · 14 min read

This article explains the complete Spring Bean lifecycle—from bean retrieval, through creation, property population, initialization, and destruction—using detailed flowcharts, step‑by‑step descriptions, and full source code snippets to illustrate each phase.
Bean LifecycleJavaSpring
0 likes · 13 min read

This comprehensive guide explores the fundamentals of the Spring framework—including its core modules, dependency injection, IoC, bean scopes, configuration styles, annotation-driven setup, event handling, and common design patterns—providing Java developers with practical examples and code snippets to master Spring's capabilities.
Bean LifecycleConfigurationIoC
0 likes · 25 min read

This article completes the Spring Bean lifecycle overview by illuminating the remaining phases, explains how various XxxxAware interfaces are invoked during bean initialization, demonstrates common pitfalls with constructor injection, and provides code examples for implementing and using Aware interfaces such as BeanNameAware and BeanFactoryAware.
Aware InterfaceBean LifecycleJava
0 likes · 7 min read

This article provides an in‑depth, English‑language overview of the Spring framework, covering its purpose, core modules, IoC and AOP principles, bean scopes and lifecycle, transaction management, MVC architecture, and the design patterns it employs, all without heavy code examples.
AOPBean LifecycleIoC
0 likes · 20 min read
