Tagged articles
40 articles
Page 1 of 1
Coder Trainee
Coder Trainee
May 8, 2026 · Backend Development

How Spring Boot Instantiates Beans and Resolves Circular Dependencies

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.

Spring Bootaopbean
0 likes · 14 min read
How Spring Boot Instantiates Beans and Resolves Circular Dependencies
Java One
Java One
Dec 22, 2025 · Backend Development

Injecting Third‑Party Classes in Spring Boot with @Configuration and @Bean

This tutorial explains how to register and inject a third‑party implementation like SwimCoach into a Spring Boot application using a @Configuration class and @Bean methods, covering bean creation, custom IDs, qualifier usage, and practical scenarios such as integrating AWS S3 clients.

AWSConfigurationbean
0 likes · 5 min read
Injecting Third‑Party Classes in Spring Boot with @Configuration and @Bean
Tech Freedom Circle
Tech Freedom Circle
Dec 20, 2025 · Backend Development

How SpringBoot Loads Classes: Deep Dive into ClassLoaders and Bean Creation

This article dissects the SpringBoot class‑loading mechanism, explaining how the JVM parent‑delegation model is selectively overridden with custom class loaders like LaunchedURLClassLoader and RestartClassLoader, and how these changes integrate with Spring's bean lifecycle, auto‑configuration, and practical troubleshooting techniques.

DevToolsJavaSpringBoot
0 likes · 37 min read
How SpringBoot Loads Classes: Deep Dive into ClassLoaders and Bean Creation
Java One
Java One
Dec 8, 2025 · Backend Development

How to Enable Lazy Initialization for Spring Beans to Boost Startup Performance

This article explains Spring's default eager bean creation, demonstrates how to add @Lazy annotations or a global property to defer bean instantiation until needed, and discusses the benefits and drawbacks of lazy loading with code examples and runtime observations.

Backendbeanlazy-initialization
0 likes · 4 min read
How to Enable Lazy Initialization for Spring Beans to Boost Startup Performance
Cognitive Technology Team
Cognitive Technology Team
Jul 8, 2025 · Backend Development

How to Register Spring Beans at Runtime: A Step‑by‑Step Guide

This tutorial explains multiple ways to register Spring beans dynamically at runtime, covering BeanDefinitionRegistryPostProcessor implementation, programmatic bean creation with BeanDefinitionBuilder, ApplicationContextInitializer usage, BeanFactory registration, and direct BeanDefinitionRegistry manipulation, complete with code examples and configuration details.

BackendJavabean
0 likes · 7 min read
How to Register Spring Beans at Runtime: A Step‑by‑Step Guide
Java Architect Essentials
Java Architect Essentials
Jul 6, 2025 · Backend Development

Mastering Spring Bean Circular Dependencies: 3 Real-World Solutions

This article explains Spring's three‑level cache mechanism for resolving bean circular dependencies, dives into why the cache alone is insufficient, and presents three practical scenarios with concrete solutions such as redesigning constructors, using @Lazy, and handling AOP proxy consistency.

BackendJavaThree-level Cache
0 likes · 14 min read
Mastering Spring Bean Circular Dependencies: 3 Real-World Solutions
Java Captain
Java Captain
Jun 24, 2025 · Backend Development

Master Spring Configuration: XML vs Java, Bean Lifecycle, and Advanced Profiles

This article explains Spring configuration files, comparing XML and Java (annotation‑based) approaches, details bean creation, scopes, initialization and destruction, and demonstrates advanced techniques such as conditional beans and profile‑specific configurations with clear code examples.

ConditionalConfigurationJava
0 likes · 6 min read
Master Spring Configuration: XML vs Java, Bean Lifecycle, and Advanced Profiles
Top Architect
Top Architect
Jun 25, 2024 · Backend Development

A Comprehensive Guide to Spring Boot Startup Sequence and Extension Points

This article explains the Spring Boot startup process, enumerates the key extension points and their execution order, demonstrates the sequence with practical code examples, and answers common questions about bean initialization, lifecycle callbacks, and the proper timing for opening RPC, MQ, and HTTP traffic.

ExtensionPointsJavaLifecycle
0 likes · 16 min read
A Comprehensive Guide to Spring Boot Startup Sequence and Extension Points
政采云技术
政采云技术
Dec 12, 2023 · Backend Development

Understanding Spring's Circular Dependency Resolution via Three-Level Caches

This article explains how Spring handles common circular dependencies between singleton Beans by employing a three‑level cache (singletonObjects, earlySingletonObjects, singletonFactories), detailing the prerequisites, cache structures, workflow, and key source code snippets that illustrate the underlying mechanism.

Backend DevelopmentThree-level Cachebean
0 likes · 10 min read
Understanding Spring's Circular Dependency Resolution via Three-Level Caches
Top Architect
Top Architect
May 5, 2023 · Backend Development

How to Register Beans in the Spring Container: Five Common Methods

This article explains five ways to add a bean to the Spring IoC container—including @Configuration + @Bean, @Component + @ComponentScan, various @Import techniques, FactoryBean, and BeanDefinitionRegistryPostProcessor—provides complete code examples for each, and concludes with a summary and related promotional notes.

Backend DevelopmentJavabean
0 likes · 12 min read
How to Register Beans in the Spring Container: Five Common Methods
Selected Java Interview Questions
Selected Java Interview Questions
Oct 9, 2022 · Backend Development

Various Ways to Register Beans in the Spring IoC Container

This article explains six common techniques for adding beans to the Spring IoC container, including @Configuration with @Bean, @Component with @ComponentScan, various @Import approaches, FactoryBean, and BeanDefinitionRegistryPostProcessor, providing code examples and usage details for each method.

Configurationbeandependency-injection
0 likes · 9 min read
Various Ways to Register Beans in the Spring IoC Container
Su San Talks Tech
Su San Talks Tech
Oct 4, 2022 · Backend Development

11 Must‑Know Spring Extension Points to Supercharge Your Java Backend

Explore the 11 most commonly used Spring extension points—from custom interceptors and bean factories to global exception handling, type converters, import mechanisms, startup runners, bean lifecycle processors, and custom scopes—complete with clear code examples and practical guidance for enhancing Java backend applications.

BackendConfigurationExtension Points
0 likes · 11 min read
11 Must‑Know Spring Extension Points to Supercharge Your Java Backend
Programmer DD
Programmer DD
Sep 26, 2022 · Backend Development

5 Ways to Register Beans in Spring: From @Configuration to FactoryBean

This article explains five different techniques for adding beans to the Spring IoC container—including @Configuration + @Bean, @ComponentScan, @Import with various selectors, FactoryBean, and BeanDefinitionRegistryPostProcessor—providing complete code examples and practical usage notes for developers.

ConfigurationFactoryBeanIoC
0 likes · 10 min read
5 Ways to Register Beans in Spring: From @Configuration to FactoryBean
Java Architect Essentials
Java Architect Essentials
Aug 17, 2022 · Backend Development

Pitfalls and Solutions for Converting Java Beans to Maps

Converting Java beans to maps often leads to type loss and incorrect property names due to JSON frameworks and BeanUtils behavior, and this article examines those pitfalls, demonstrates them with code examples, analyzes underlying Java introspection mechanisms, and presents a Dubbo‑based solution to reliably preserve types and property names.

DubboJSONMAP
0 likes · 12 min read
Pitfalls and Solutions for Converting Java Beans to Maps
Selected Java Interview Questions
Selected Java Interview Questions
Jul 31, 2022 · Backend Development

Understanding Spring IoC, Bean Instantiation, and Dependency Injection

This article explains the concepts of coupling, Inversion of Control, and Dependency Injection in the Spring framework, demonstrates various bean instantiation methods—including no‑arg constructors, static and instance factory methods—and provides a complete example of configuring and using Spring beans in a Java application.

IoCbeandependency-injection
0 likes · 9 min read
Understanding Spring IoC, Bean Instantiation, and Dependency Injection
Java Backend Technology
Java Backend Technology
Sep 12, 2021 · Backend Development

Mastering Spring Bean Definitions: XML, Annotations, JavaConfig & Import Techniques

This comprehensive guide explores every way to define Spring beans—from classic XML configurations and constructor or setter injection to modern @Component annotations, JavaConfig @Bean methods, and advanced @Import, ImportSelector, and post‑processor techniques—empowering developers to choose the most suitable approach for any project.

ImportJavaConfigPostProcessor
0 likes · 18 min read
Mastering Spring Bean Definitions: XML, Annotations, JavaConfig & Import Techniques
Top Architect
Top Architect
Jul 31, 2021 · Backend Development

Understanding Spring Bean Instantiation Process

This article explains how Spring's IoC container creates and manages beans, covering the container startup phase, bean definition loading, BeanFactoryPostProcessor and BeanPostProcessor extensions, object creation strategies, property injection, Aware interfaces, and bean lifecycle callbacks.

IoCJavabean
0 likes · 14 min read
Understanding Spring Bean Instantiation Process
Java Tech Enthusiast
Java Tech Enthusiast
Jun 18, 2021 · Backend Development

Spring Annotation-Based Bean Registration Guide

The guide explains how Spring’s annotation-driven configuration—using @Configuration and @Bean to define beans, @ComponentScan for automatic detection, and additional annotations such as @Scope, @Lazy, @Conditional, @Import and FactoryBean—replaces verbose XML, streamlining bean registration and lifecycle management.

ConfigurationJavaannotations
0 likes · 10 min read
Spring Annotation-Based Bean Registration Guide
Java Tech Enthusiast
Java Tech Enthusiast
Jun 3, 2021 · Backend Development

Master Spring IoC: From Bean Creation to Dependency Injection

This tutorial explains the concept of Inversion of Control in Spring, demonstrates how to configure beans with XML, compares BeanFactory and ApplicationContext, explores bean scopes and lifecycle, and provides detailed examples of constructor, static‑factory, instance‑factory, and collection injection techniques.

Backend DevelopmentIoCJava
0 likes · 19 min read
Master Spring IoC: From Bean Creation to Dependency Injection
Java Interview Crash Guide
Java Interview Crash Guide
Apr 28, 2021 · Backend Development

Inside Spring: How Beans Are Instantiated Step by Step

This article explains the two‑phase lifecycle of Spring beans, covering container startup tasks, metadata loading, bean definition registration, and the detailed instantiation process including object creation strategies, BeanWrapper, property injection, Aware interfaces, post‑processors, and custom init/destroy logic.

IoCJavabean
0 likes · 16 min read
Inside Spring: How Beans Are Instantiated Step by Step
Selected Java Interview Questions
Selected Java Interview Questions
Apr 27, 2021 · Backend Development

Understanding the Spring Bean Instantiation Process

This article explains how the Spring IoC container prepares and creates Bean instances, detailing the two main phases—container startup and Bean instantiation—along with the roles of BeanDefinition, BeanFactoryPostProcessor, BeanWrapper, Aware interfaces, BeanPostProcessor, and custom initialization and destruction logic.

BackendIoCJava
0 likes · 16 min read
Understanding the Spring Bean Instantiation Process
Top Architect
Top Architect
Dec 8, 2020 · Backend Development

Understanding Thread Safety of Spring Beans: Singleton vs Prototype Scope

This article explains why Spring beans are not inherently thread‑safe, compares the singleton and prototype scopes, shows how stateless beans can be safe, demonstrates the impact of static fields and injected beans, and provides practical code examples and recommendations for achieving thread safety in Spring applications.

JavaSingletonbean
0 likes · 11 min read
Understanding Thread Safety of Spring Beans: Singleton vs Prototype Scope
Selected Java Interview Questions
Selected Java Interview Questions
Jul 27, 2020 · Backend Development

Understanding Spring Controller Scope and Thread Safety

The article explains why Spring MVC controllers are singleton by default, demonstrates the resulting thread‑unsafe behavior with example code, shows how applying @Scope("prototype") makes them prototype scoped, and provides best‑practice recommendations and a summary of Spring bean scopes.

ControllerSingletonbean
0 likes · 5 min read
Understanding Spring Controller Scope and Thread Safety
Java Captain
Java Captain
May 4, 2020 · Backend Development

How Spring Solves Circular Dependencies and the Underlying Essence

This article explains how Spring resolves circular dependencies for singleton beans using a three‑level cache, demonstrates a simple prototype implementation that mimics Spring's behavior, and relates the problem to the classic two‑sum algorithm to reveal its fundamental nature.

JavaTwo Sumbean
0 likes · 9 min read
How Spring Solves Circular Dependencies and the Underlying Essence
Senior Brother's Insights
Senior Brother's Insights
Feb 25, 2019 · Backend Development

Master Spring @Configuration and @Bean: From Java Classes to Fully Configured Beans

Spring’s shift from XML to annotation‑based configuration is explained, covering @Configuration and @Bean requirements, example Java classes, equivalent XML, annotation definitions, bean scopes, component scanning, unit‑testing, and practical tips for wiring beans without field injection, providing a complete guide for modern Spring development.

JavaSpring Bootannotation
0 likes · 8 min read
Master Spring @Configuration and @Bean: From Java Classes to Fully Configured Beans
Programmer DD
Programmer DD
Dec 3, 2018 · Backend Development

Master Spring Core Annotations: @Autowired, @Bean, @Qualifier, @Value and More

This article provides a comprehensive guide to Spring's core annotations—including @Autowired, @Bean, @Qualifier, @Required, @Value, @DependsOn, @Lazy, @Lookup, @Primary, @Scope, @Profile, @Import, @ImportResource, @PropertySource and @PropertySources—explaining their purpose, usage patterns, and code examples for constructor, setter, and field injection in Java applications.

beandependency-injectionspring
0 likes · 10 min read
Master Spring Core Annotations: @Autowired, @Bean, @Qualifier, @Value and More
Java Captain
Java Captain
Oct 16, 2018 · Backend Development

Practical SpringBoot Tips: Mocking External Dependencies and Encrypting Configuration

This article shares practical SpringBoot techniques for locally mocking external service dependencies and encrypting configuration properties, detailing step-by-step bean replacement using PowerMockito, configuration encryption with Jasypt, and accompanying code examples for seamless development without starting full distributed services.

JavaMockingSpringBoot
0 likes · 8 min read
Practical SpringBoot Tips: Mocking External Dependencies and Encrypting Configuration
Java Captain
Java Captain
Feb 23, 2018 · Backend Development

Spring Framework IoC and Dependency Injection: Configuration, Bean Management, and Annotation‑Based Development

This article introduces the lightweight Spring framework, explains the concepts of IoC and AOP, demonstrates how to configure beans using XML and annotations, and provides detailed code examples for object creation, property injection, complex type injection, and annotation‑driven bean management in Java.

beandependency-injection
0 likes · 17 min read
Spring Framework IoC and Dependency Injection: Configuration, Bean Management, and Annotation‑Based Development
Architecture Digest
Architecture Digest
May 17, 2016 · Backend Development

Introduction to the Spring Framework: Core Concepts, Bean Management, and AOP

This article provides a comprehensive overview of the Spring framework, covering its low‑invasion design, IoC container, dependency injection types, bean scopes, autowiring options, bean creation methods, post‑processors, zero‑configuration annotations, and AOP support with AspectJ, supplemented by practical code examples.

BackendIoCJava
0 likes · 20 min read
Introduction to the Spring Framework: Core Concepts, Bean Management, and AOP
Qunar Tech Salon
Qunar Tech Salon
Jan 30, 2016 · Backend Development

Spring IoC Bean Configuration, Naming, and Instantiation Guide

This article explains how to structure Spring XML configuration files, define bean metadata, use id/name/alias for bean naming, and instantiate beans via constructors, static factory methods, or instance factories, providing detailed code examples and JUnit tests for each approach.

IoCXML Configurationbean
0 likes · 12 min read
Spring IoC Bean Configuration, Naming, and Instantiation Guide
Qunar Tech Salon
Qunar Tech Salon
Jan 29, 2016 · Backend Development

Understanding Spring IoC Container, Beans, and a Hello World Example

This article explains the concepts of Spring's IoC container and beans, guides through setting up a development environment, details the required JARs, demonstrates creating a simple Hello World application with interface and implementation, and shows how to configure and retrieve beans using XML configuration.

IoCXML Configurationbean
0 likes · 11 min read
Understanding Spring IoC Container, Beans, and a Hello World Example