Tagged articles

Dependency Injection

514 articles · Page 4 of 6
Top Architect
Top Architect
Aug 29, 2022 · Backend Development

Ways to Register Beans into the Spring Container

This article explains various methods to add beans to the Spring IoC container, including @Configuration with @Bean, component scanning, @Import with selectors or registrars, FactoryBean usage, and BeanDefinitionRegistryPostProcessor, providing code examples and detailed explanations for each approach.

Bean RegistrationDependency InjectionIOC
0 likes · 9 min read
Ways to Register Beans into the Spring Container
Selected Java Interview Questions
Selected Java Interview Questions
Aug 16, 2022 · Backend Development

Spring Framework Design Patterns Overview

This article explains how Spring implements various design patterns—including Simple Factory, Factory Method, Singleton, Adapter, Decorator, Proxy, Observer, Strategy, and Template Method—detailing their implementation approaches, underlying principles, and practical code examples within the Spring container.

AOPBackend DevelopmentDependency Injection
0 likes · 13 min read
Spring Framework Design Patterns Overview
Tencent Cloud Developer
Tencent Cloud Developer
Aug 15, 2022 · Backend Development

Why Dependency Injection Matters in Go and How to Leverage Uber’s Fx Framework

This article explains the concept of dependency injection, why it is essential for Go backend services, compares manual object wiring with DI containers, reviews popular Go DI libraries, and demonstrates how to use Uber’s Fx framework (and a custom Viego framework) to simplify application initialization and lifecycle management.

Backend DevelopmentDependency InjectionGo
0 likes · 11 min read
Why Dependency Injection Matters in Go and How to Leverage Uber’s Fx Framework
Laravel Tech Community
Laravel Tech Community
Aug 1, 2022 · Fundamentals

Understanding Inversion of Control (IoC) with PHP Code Examples

This article explains the Inversion of Control (IoC) principle, contrasts a tightly coupled logging implementation with a dependency‑injected version in PHP, and demonstrates how passing a logger via the constructor decouples classes and follows the open‑closed principle.

Dependency InjectionIOCInversion of Control
0 likes · 3 min read
Understanding Inversion of Control (IoC) with PHP Code Examples
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.

BeanDependency InjectionIOC
0 likes · 9 min read
Understanding Spring IoC, Bean Instantiation, and Dependency Injection
BaiPing Technology
BaiPing Technology
Jul 11, 2022 · Frontend Development

When Vue 3 Provide/Inject Fails: Key Insights and Fixes

This article explains how Vue 3's provide/inject mechanism works, demonstrates proper usage with strings, refs, and Symbols, analyzes why injected data may be unavailable across applications, and offers practical solutions such as using Symbol.for and application‑level provides.

Dependency InjectionInjectSymbol
0 likes · 11 min read
When Vue 3 Provide/Inject Fails: Key Insights and Fixes
Java High-Performance Architecture
Java High-Performance Architecture
Jun 13, 2022 · Backend Development

Understanding Spring Boot Auto-Configuration: From Basics to Custom Starter

This article explains why Spring Boot was created, outlines its key features such as convention over configuration and automatic wiring, dives into the inner workings of annotations like @EnableAutoConfiguration, demonstrates how SpringFactoriesLoader implements SPI, and guides you through building a simple starter component step by step.

Auto-ConfigurationDependency InjectionJava
0 likes · 13 min read
Understanding Spring Boot Auto-Configuration: From Basics to Custom Starter
Cognitive Technology Team
Cognitive Technology Team
May 20, 2022 · Backend Development

Controlling Bean Initialization Order in Spring: Using @Autowired, @Resource, @Inject and @DependsOn

This article explains how Spring developers can explicitly control bean instantiation order by using dependency‑injection annotations such as @Autowired, @Resource, @Inject, and the @DependsOn annotation, detailing the underlying processors and showing code examples for each mechanism.

Bean InitializationDependency InjectionJava
0 likes · 4 min read
Controlling Bean Initialization Order in Spring: Using @Autowired, @Resource, @Inject and @DependsOn
Sanyou's Java Diary
Sanyou's Java Diary
May 19, 2022 · Backend Development

Mastering Spring: Core Concepts, Modules, Annotations & Advanced Features

This comprehensive guide walks through Spring’s fundamentals—including IoC, DI, core modules, common annotations, AOP concepts, transaction management, MVC workflow, and Spring Boot auto‑configuration—while also covering advanced topics such as bean lifecycle, circular dependencies, proxy mechanisms, and an introduction to Spring Cloud.

AOPDependency InjectionIOC
0 likes · 54 min read
Mastering Spring: Core Concepts, Modules, Annotations & Advanced Features
macrozheng
macrozheng
May 6, 2022 · Backend Development

Master Spring Bean Injection: XML, Annotations, FactoryBean & RegistryPostProcessor

Explore multiple Spring bean injection techniques—including XML configuration, annotation-driven @Configuration/@Bean, @Import, FactoryBean, and BeanDefinitionRegistryPostProcessor—through clear explanations, code samples, and practical examples, highlighting their advantages, drawbacks, and how to integrate them into a Spring application.

BeanDefinitionRegistryPostProcessorDependency InjectionJava
0 likes · 10 min read
Master Spring Bean Injection: XML, Annotations, FactoryBean & RegistryPostProcessor
Open Source Tech Hub
Open Source Tech Hub
Apr 23, 2022 · Backend Development

Should You Avoid Field Injection in Spring? Constructor vs Setter Trade‑offs

Field injection in Spring looks concise, but it introduces hidden dependencies, violates the Single Responsibility Principle, hampers immutability, and tightly couples code to the DI container; the article compares constructor, setter, and field injection, explains their drawbacks, and recommends using constructors for mandatory dependencies and setters for optional ones.

Constructor InjectionDependency InjectionField Injection
0 likes · 9 min read
Should You Avoid Field Injection in Spring? Constructor vs Setter Trade‑offs
Java Captain
Java Captain
Apr 6, 2022 · Backend Development

Understanding Spring Boot Auto‑Configuration and Bean Definition Mechanisms

This article provides a comprehensive tutorial on Spring Boot's auto‑configuration process, covering bean injection styles, XML and JavaConfig configurations, BeanDefinition internals, autowire modes, constructor argument handling, custom BeanFactoryPostProcessor usage, @Import mechanisms, and the inner workings of Spring Boot's EnableAutoConfiguration and its loading of META‑INF/spring.factories.

Auto-ConfigurationBean DefinitionDependency Injection
0 likes · 28 min read
Understanding Spring Boot Auto‑Configuration and Bean Definition Mechanisms
IT Xianyu
IT Xianyu
Apr 1, 2022 · Backend Development

Why Use Spring? Understanding How It Solves Coupling Problems with Dependency Injection

This article compares traditional object creation with Spring’s dependency injection, demonstrating how injecting DAO beans via XML configuration decouples service and data layers, includes Java code examples, test results, and visual analogies of gear systems to illustrate reduced coupling.

Backend DevelopmentDependency InjectionIOC
0 likes · 5 min read
Why Use Spring? Understanding How It Solves Coupling Problems with Dependency Injection
Selected Java Interview Questions
Selected Java Interview Questions
Mar 26, 2022 · Backend Development

Comparison of @Resource and @Autowired for Bean Injection in Spring

This article explains the similarities and differences between Spring's @Autowired and the JSR‑250 @Resource annotations, covering their packages, injection mechanisms, usage on fields and setters, configuration options, IDE warnings, and best‑practice recommendations for bean injection in Java backend development.

Dependency InjectionSpringannotations
0 likes · 6 min read
Comparison of @Resource and @Autowired for Bean Injection in Spring
Cognitive Technology Team
Cognitive Technology Team
Mar 25, 2022 · Backend Development

Resolving Circular Dependency Issues in SpringBoot: Causes, Exceptions, and Practical Solutions

This article explains why SpringBoot throws BeanCurrentlyInCreationException when circular dependencies arise, especially with constructor injection, and provides multiple mitigation techniques such as disabling the restriction, using @Lazy, setter injection, and direct ApplicationContext bean retrieval.

Dependency InjectionJavacircular dependency
0 likes · 3 min read
Resolving Circular Dependency Issues in SpringBoot: Causes, Exceptions, and Practical Solutions
Sohu Tech Products
Sohu Tech Products
Mar 23, 2022 · Backend Development

Building a Simple Spring IOC Container: XML and Annotation‑Based Bean Assembly

This article demonstrates how to create a lightweight Spring‑style IoC container in Java by parsing a properties file for XML‑like configuration, implementing annotation‑driven bean registration with a custom @Bean annotation, and adding automatic field injection using a custom @Autowired annotation, complete with full source code examples.

AnnotationDependency InjectionIOC
0 likes · 11 min read
Building a Simple Spring IOC Container: XML and Annotation‑Based Bean Assembly
Java Backend Technology
Java Backend Technology
Mar 18, 2022 · Backend Development

Why @Configuration @Bean Overrides @Component in Spring Boot 2.0.3

An in‑depth analysis shows that in Spring Boot 2.0.3 a @Configuration class defining a @Bean can override a @Component‑annotated bean of the same type, how the Spring container registers and replaces the bean definitions, and the evolution of bean‑overriding controls in later Spring and Spring Boot releases.

Backend DevelopmentBean OverridingComponent
0 likes · 8 min read
Why @Configuration @Bean Overrides @Component in Spring Boot 2.0.3
macrozheng
macrozheng
Mar 16, 2022 · Backend Development

Build a Mini Spring IoC Container in 5 Minutes: Hands‑On Tutorial

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.

Backend DevelopmentBeanFactoryDependency Injection
0 likes · 10 min read
Build a Mini Spring IoC Container in 5 Minutes: Hands‑On Tutorial
Java Captain
Java Captain
Mar 15, 2022 · Backend Development

Why Enterprise Java Projects Turn Into Over‑Engineered Monsters

The article sarcastically critiques the over‑engineered nature of enterprise Java projects, illustrating how simple tasks become tangled in excessive classes, interfaces, factories, dependency‑injection frameworks, XML configurations, massive JARs, and IDE bloat, ultimately leading to deployment failures due to environment mismatches.

Dependency InjectionEnterprise ArchitectureJava
0 likes · 5 min read
Why Enterprise Java Projects Turn Into Over‑Engineered Monsters
macrozheng
macrozheng
Mar 10, 2022 · Backend Development

Master Spring Annotations: @Component vs @Bean, @Autowired vs @Resource, @ControllerAdvice

This article explains several often‑confused Spring annotations—including the differences between @Component and @Bean, the injection behaviors of @Autowired versus @Resource, the roles of @Component, @Repository, @Service, and @Controller, the purpose of @Configuration and @ControllerAdvice, and provides practical code examples for each.

Dependency InjectionJavaSpring
0 likes · 11 min read
Master Spring Annotations: @Component vs @Bean, @Autowired vs @Resource, @ControllerAdvice
Top Architect
Top Architect
Mar 9, 2022 · Backend Development

Deep Dive into Spring Bean Lifecycle and Initialization Process

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 LifecycleDependency InjectionJava
0 likes · 24 min read
Deep Dive into Spring Bean Lifecycle and Initialization Process
Java Tech Enthusiast
Java Tech Enthusiast
Mar 9, 2022 · Backend Development

Annotation‑Based Bean Management and Dependency Injection in Spring

Spring’s annotation‑based bean registration and dependency injection replace verbose XML by using component scanning with @Component, @Controller, @Service, and @Repository, while @Autowired (or @Qualifier/@Primary) injects beans by type, @Resource supports name‑based injection, and @Value together with @PropertySource loads external configuration, though developers must handle issues such as NoUniqueBeanDefinitionException when multiple candidates exist.

@QualifierAutowiredDependency Injection
0 likes · 8 min read
Annotation‑Based Bean Management and Dependency Injection in Spring
Tencent Cloud Developer
Tencent Cloud Developer
Mar 8, 2022 · Backend Development

Go Microservices Architecture Best Practices Based on Clean Architecture and trpc-Go

The article presents clean‑architecture best practices for Go microservices built with trpc‑Go, recommending a four‑layer pyramid (gateway, logic, repo, entity), strict dependency inversion, interface‑based injection, gomock testing, centralized JSON configuration, and a three‑phase rollout to replace tangled packages and global imports while avoiding DDD complexity.

Clean ArchitectureDependency InjectionGo backend
0 likes · 14 min read
Go Microservices Architecture Best Practices Based on Clean Architecture and trpc-Go
Java High-Performance Architecture
Java High-Performance Architecture
Mar 1, 2022 · Backend Development

Unlocking Spring: Core Principles, Design Patterns, and IoC Explained

This comprehensive guide walks through Spring's lightweight Java framework, covering its core principles, key features, advantages and drawbacks, the design patterns it employs, core modules, IoC container mechanics, bean scopes, lifecycle, dependency injection techniques, and AOP fundamentals, all illustrated with diagrams and code snippets.

AOPDependency InjectionIOC
0 likes · 48 min read
Unlocking Spring: Core Principles, Design Patterns, and IoC Explained
Top Architect
Top Architect
Feb 27, 2022 · Backend Development

Why Field Injection Is Discouraged in Spring and Preferred Alternatives

The article explains Spring's warning against field injection, compares constructor‑based, setter‑based, and field‑based dependency injection with code examples, outlines the drawbacks of field injection, and recommends using constructor or setter injection for safer, more maintainable backend Java applications.

Constructor InjectionDependency InjectionField Injection
0 likes · 7 min read
Why Field Injection Is Discouraged in Spring and Preferred Alternatives
Sanyou's Java Diary
Sanyou's Java Diary
Jan 18, 2022 · Backend Development

Deep Dive into Spring Bean Lifecycle: Property Assignment, Aware Callbacks, Initialization & Destruction

This article continues the Spring bean lifecycle series by explaining the property‑assignment stage, Aware interface callbacks, bean initialization phases, and the destruction process, illustrating each step with source‑code diagrams and highlighting how BeanPostProcessor extensions drive the lifecycle.

Backend DevelopmentDependency InjectionSpring
0 likes · 9 min read
Deep Dive into Spring Bean Lifecycle: Property Assignment, Aware Callbacks, Initialization & Destruction
政采云技术
政采云技术
Jan 4, 2022 · Backend Development

Understanding Dependency Injection in NestJS

This article explains the core concepts of dependency injection, inversion of control, and metadata reflection in NestJS, demonstrates how they are implemented with TypeScript decorators and reflective metadata, and walks through the framework's internal IoC container, module scanning, and instance creation process.

Dependency InjectionIOCNestJS
0 likes · 15 min read
Understanding Dependency Injection in NestJS
Top Architect
Top Architect
Dec 8, 2021 · Backend Development

Do You Need Interfaces in the Service Layer? A Top Architect’s Perspective

The article examines whether the Service layer in a Spring‑based Java project truly requires interfaces, debunks common justifications, proposes practical development workflows, and outlines project structures for both single and multiple implementations, concluding with recommendations on when to use interfaces.

Dependency InjectionJavaSpring
0 likes · 8 min read
Do You Need Interfaces in the Service Layer? A Top Architect’s Perspective
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 29, 2021 · Backend Development

Master Spring’s ObjectFactory & FactoryBean: Real-World Usage

This article explains the differences between Spring’s ObjectFactory and FactoryBean interfaces, demonstrates how they are used internally for bean creation, dependency injection, and servlet API injection, and shows how to customize ObjectFactory behavior to resolve bean conflicts and inject specific implementations.

Backend DevelopmentDependency InjectionJava
0 likes · 9 min read
Master Spring’s ObjectFactory & FactoryBean: Real-World Usage
macrozheng
macrozheng
Nov 29, 2021 · Backend Development

Why Constructor Injection Outperforms Field and Setter Injection in Spring

This article explains Spring's three dependency injection methods—field, constructor, and setter—examines why IntelliJ IDEA warns against field injection, and compares them across reliability, maintainability, testability, flexibility, cycle detection, and performance, concluding that constructor injection is generally the preferred approach.

Constructor InjectionDependency InjectionField Injection
0 likes · 7 min read
Why Constructor Injection Outperforms Field and Setter Injection in Spring
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 22, 2021 · Backend Development

How Spring Cloud Feign Works: Enabling, Bean Registration, and Proxy Injection

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.

Backend DevelopmentDependency InjectionDynamic Proxy
0 likes · 15 min read
How Spring Cloud Feign Works: Enabling, Bean Registration, and Proxy Injection
Code Ape Tech Column
Code Ape Tech Column
Nov 13, 2021 · Backend Development

Spring Framework Interview Questions and Answers Overview

This article compiles a comprehensive set of Spring interview questions covering design patterns, core modules, IoC, DI, AOP, proxy mechanisms, bean lifecycle, circular dependency resolution, transaction isolation and propagation, as well as Spring Boot auto‑configuration principles, providing concise explanations for each topic.

AOPDependency InjectionIOC
0 likes · 16 min read
Spring Framework Interview Questions and Answers Overview
Selected Java Interview Questions
Selected Java Interview Questions
Nov 7, 2021 · Backend Development

Do Service and DAO Layers Need Interfaces? When to Omit Them in Spring Projects

This article examines whether Service and DAO layers in Java Spring applications must always have interfaces, explains why dependency‑injection frameworks make interfaces optional, discusses development workflows, multiple‑implementation scenarios, project structuring options, and outlines the trade‑offs of using or not using interfaces.

Backend DevelopmentDependency InjectionJava
0 likes · 9 min read
Do Service and DAO Layers Need Interfaces? When to Omit Them in Spring Projects
Programmer DD
Programmer DD
Nov 6, 2021 · Backend Development

Three Ways to Access Spring Beans from Static Methods

This article demonstrates three practical techniques for retrieving Spring-managed beans inside static methods—using @PostConstruct initialization, a static ApplicationContext from the main class, and a manual ApplicationContextAware component—complete with code examples and usage guidelines.

ApplicationContextDependency InjectionJava
0 likes · 6 min read
Three Ways to Access Spring Beans from Static Methods
Programmer DD
Programmer DD
Nov 5, 2021 · Backend Development

Constructor Injection vs Field Injection: Which Spring Dependency Method Is Best?

This article explains Spring’s three dependency injection methods—Field, Constructor, and Setter—detailing their implementations, advantages, and drawbacks, and shows why IDEs warn against field injection, recommending constructor injection as the preferred approach for.

Constructor InjectionDependency InjectionField Injection
0 likes · 7 min read
Constructor Injection vs Field Injection: Which Spring Dependency Method Is Best?
Java Architect Essentials
Java Architect Essentials
Nov 3, 2021 · Backend Development

Three Ways to Access Spring Beans in Static Methods Using Spring Boot

This article explains three techniques for obtaining Spring beans inside static methods—using @PostConstruct initialization, a static ApplicationContext stored in the main class, and implementing ApplicationContextAware—complete with code examples and detailed guidelines for the @PostConstruct annotation.

ApplicationContextDependency InjectionJava
0 likes · 6 min read
Three Ways to Access Spring Beans in Static Methods Using Spring Boot
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 31, 2021 · Backend Development

Spring Bean Injection Methods: Property, Setter, and Constructor Injection

This article explains Spring's three bean injection approaches—property, setter, and constructor injection—detailing their syntax, advantages, and drawbacks, referencing official Spring documentation to show the evolution from setter to constructor injection and advising developers on best practices.

Constructor InjectionDependency InjectionJava
0 likes · 7 min read
Spring Bean Injection Methods: Property, Setter, and Constructor Injection
Selected Java Interview Questions
Selected Java Interview Questions
Oct 29, 2021 · Backend Development

Differences Between @Autowired, @Resource, and @Inject and Why Field Injection Is Not Recommended in Spring

This article explains the distinctions among Spring's @Autowired, @Resource, and @Inject annotations, describes the IDE warning "Field injection is not recommended", compares field, setter, and constructor injection methods, and provides best‑practice recommendations with code examples.

AutowiredDependency InjectionInject
0 likes · 14 min read
Differences Between @Autowired, @Resource, and @Inject and Why Field Injection Is Not Recommended in Spring
Top Architect
Top Architect
Oct 29, 2021 · Backend Development

Three Methods to Obtain Spring Beans in Static Context: @PostConstruct, ApplicationContext, and ApplicationContextAware

This article explains three practical ways to retrieve Spring beans from static methods—using @PostConstruct annotation, a static ApplicationContext defined in the main class, and a manually injected ApplicationContext via ApplicationContextAware—complete with code examples and usage notes.

ApplicationContextBean RetrievalDependency Injection
0 likes · 5 min read
Three Methods to Obtain Spring Beans in Static Context: @PostConstruct, ApplicationContext, and ApplicationContextAware
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 22, 2021 · Backend Development

Unlock Spring BeanPostProcessor & BeanFactoryPostProcessor for Backend Customization

This article explains how to extend the Spring IoC container using custom BeanPostProcessor, BeanFactoryPostProcessor, and FactoryBean implementations, covering registration methods, ordering, interaction with AOP proxies, and practical code examples for tracing bean creation and externalizing configuration properties.

Backend DevelopmentBeanPostProcessorDependency Injection
0 likes · 13 min read
Unlock Spring BeanPostProcessor & BeanFactoryPostProcessor for Backend Customization
Selected Java Interview Questions
Selected Java Interview Questions
Oct 21, 2021 · Backend Development

Deep Dive into SpringBoot Auto‑Configuration and Startup Process

This article provides a comprehensive walkthrough of SpringBoot’s auto‑configuration mechanism, covering common annotations, configuration property binding, import strategies, conditional beans, the application startup flow, and the role of META‑INF/spring.factories in loading auto‑configuration classes.

Auto-ConfigurationDependency InjectionJava
0 likes · 16 min read
Deep Dive into SpringBoot Auto‑Configuration and Startup Process
Java Architect Essentials
Java Architect Essentials
Oct 15, 2021 · Backend Development

Master Spring MVC & Bean Annotations: A Complete Guide

This article provides a comprehensive overview of Spring MVC request‑mapping annotations, core Spring Bean annotations, dependency‑injection and scope configurations, container setup annotations, and essential Spring Boot annotations, each illustrated with clear code examples and usage tips.

Dependency InjectionJava backendSpring
0 likes · 16 min read
Master Spring MVC & Bean Annotations: A Complete Guide
Su San Talks Tech
Su San Talks Tech
Oct 11, 2021 · Backend Development

Unlock the Full Power of Spring’s @Value: Tips, Tricks, and Hidden Features

This comprehensive guide explores Spring's @Value annotation, covering basic usage, property name handling, encoding issues, default values, static fields, various data types, collection injection, EL expressions, bean injection, and the differences between ${} and #{} to help Java developers master configuration injection.

@ValueConfigurationDependency Injection
0 likes · 19 min read
Unlock the Full Power of Spring’s @Value: Tips, Tricks, and Hidden Features
Top Architect
Top Architect
Oct 6, 2021 · Backend Development

Understanding Spring AOP Proxy Creation and Common Pitfalls

This article explains how Spring AOP weaves aspect code using dynamic proxies, why internal calls via this bypass proxy logic, and how to correctly configure and obtain proxied beans using JDK/CGLIB proxies, @EnableAspectJAutoProxy, @Autowired injection, and AopContext.

AOPAspectJCGLIB
0 likes · 4 min read
Understanding Spring AOP Proxy Creation and Common Pitfalls
Selected Java Interview Questions
Selected Java Interview Questions
Oct 5, 2021 · Backend Development

Overview of Spring Web MVC and Spring Bean Annotations

This article provides a comprehensive guide to Spring Web MVC and Spring Bean annotations, detailing usage, attributes, and examples of @RequestMapping, @GetMapping, @PostMapping, @ControllerAdvice, @Autowired, @Scope, and various Spring Boot conditional annotations, helping developers understand and apply them effectively.

Dependency InjectionSpringSpring Boot
0 likes · 16 min read
Overview of Spring Web MVC and Spring Bean Annotations
Architecture Digest
Architecture Digest
Oct 5, 2021 · Backend Development

Understanding Simple Factory, Factory Method, Singleton, Adapter, Decorator, Observer, Strategy, and Template Method Patterns in Spring

This article explains how Spring implements classic design patterns—including Simple Factory via BeanFactory, Factory Method with FactoryBean, Singleton with double‑checked locking, Adapter through HandlerAdapter, Decorator via Wrapper classes, Observer in its event model, Strategy via the Resource interface, and Template Method in JdbcTemplate—providing clear examples and code snippets for each.

Backend DevelopmentDependency InjectionFactory Method
0 likes · 13 min read
Understanding Simple Factory, Factory Method, Singleton, Adapter, Decorator, Observer, Strategy, and Template Method Patterns in Spring
JavaEdge
JavaEdge
Sep 25, 2021 · Backend Development

Why Spring AOP Doesn’t Apply to ‘this’ Calls and How to Fix It

This article explains why Spring AOP proxies are not applied when a bean invokes its own methods via the this reference, compares JDK and CGLIB proxy mechanisms, and shows how to enable proxy exposure or use AopContext to achieve the desired AOP behavior.

AOPCGLIBDependency Injection
0 likes · 5 min read
Why Spring AOP Doesn’t Apply to ‘this’ Calls and How to Fix It
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 23, 2021 · Backend Development

Unlock Spring’s Aware Interfaces: Access ApplicationContext, Environment, and BeanFactory

This tutorial explains how implementing Spring’s *Aware interfaces lets beans obtain ApplicationContext, Environment, and BeanFactory objects, walks through the underlying processing mechanism, and provides concrete code examples with the relevant Spring classes and lifecycle hooks.

Aware InterfaceBeanPostProcessorDependency Injection
0 likes · 3 min read
Unlock Spring’s Aware Interfaces: Access ApplicationContext, Environment, and BeanFactory
Java Architect Essentials
Java Architect Essentials
Sep 22, 2021 · Backend Development

Spring Framework Overview: Concepts, Modules, Configuration, and Annotations

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.

Bean LifecycleDependency InjectionIOC
0 likes · 14 min read
Spring Framework Overview: Concepts, Modules, Configuration, and Annotations
Java Architect Essentials
Java Architect Essentials
Sep 10, 2021 · Backend Development

Why Field Injection Is Discouraged in Spring and Preferred Alternatives

The article explains Spring's warning against field injection, compares constructor, setter, and field injection methods with code examples, discusses the drawbacks of field injection such as final‑field incompatibility and hidden dependencies, and recommends using constructor or setter injection for safer, more maintainable code.

Backend DevelopmentConstructor InjectionDependency Injection
0 likes · 7 min read
Why Field Injection Is Discouraged in Spring and Preferred Alternatives
Programmer DD
Programmer DD
Sep 2, 2021 · Backend Development

Unlocking Spring: 9 Essential Design Patterns Every Backend Developer Should Know

This article explains how Spring implements nine classic design patterns—including Simple Factory, Factory Method, Singleton, Adapter, Decorator, Proxy, Observer, Strategy, and Template Method—detailing their implementation mechanisms, core principles, key Spring interfaces, and code examples for each pattern.

Backend DevelopmentDependency InjectionJava
0 likes · 16 min read
Unlocking Spring: 9 Essential Design Patterns Every Backend Developer Should Know
Architecture Digest
Architecture Digest
Aug 26, 2021 · Backend Development

Injecting Beans with Annotations in Spring

This article explains how to use Spring annotations such as @Component, @Configuration, @Bean, @Autowired, and @Qualifier to inject beans via XML replacement, constructor injection, setter injection, property injection, List and Map injection, providing code examples and detailed explanations for each method.

Dependency InjectionIOCJava
0 likes · 9 min read
Injecting Beans with Annotations in Spring
Laravel Tech Community
Laravel Tech Community
Aug 25, 2021 · Backend Development

Implementing Dependency Injection in PHP Using Reflection

This article explains how to build a simple PHP IoC container with reflection to automatically resolve constructor and method dependencies, demonstrates its use with example classes A, B, and C, and shows how to invoke methods with injected parameters.

Backend DevelopmentDependency InjectionPHP
0 likes · 5 min read
Implementing Dependency Injection in PHP Using Reflection
Programmer DD
Programmer DD
Aug 18, 2021 · Backend Development

How Does Spring’s @Autowired Work Under the Hood? A Deep Dive

This article explores the various ways to use Spring’s @Autowired annotation—including constructor, setter, field, and collection injection—examines its purpose, and provides a detailed analysis of its implementation in the Spring framework by dissecting the source code and related reflection mechanisms.

Dependency InjectionJavaReflection
0 likes · 17 min read
How Does Spring’s @Autowired Work Under the Hood? A Deep Dive
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Aug 17, 2021 · Backend Development

Mastering Spring @Autowired: 9 Powerful Injection Techniques

This article explains how Spring's @Autowired annotation works across constructors, methods, fields, arrays, collections, maps, optional dependencies, and special beans, providing practical code examples and important notes on required flags, ordering, and usage restrictions.

AutowiredBackend DevelopmentCode examples
0 likes · 7 min read
Mastering Spring @Autowired: 9 Powerful Injection 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.

BeanDependency InjectionIOC
0 likes · 14 min read
Understanding Spring Bean Instantiation Process
Tencent Cloud Developer
Tencent Cloud Developer
Jul 27, 2021 · Backend Development

Comprehensive Guide to Go Unit Testing: Tools, Mocking, and Dependency Management

This guide explains Go’s built‑in testing framework, assertion libraries, table‑driven and sub‑tests, and demonstrates how to mock functions, structs, interfaces, databases, and Redis using tools such as ngmock, gomock, sqlmock and miniredis, while covering test setup, teardown, coverage handling, and best‑practice insights.

Dependency InjectionGoMock
0 likes · 21 min read
Comprehensive Guide to Go Unit Testing: Tools, Mocking, and Dependency Management
Top Architect
Top Architect
Jul 23, 2021 · Backend Development

Design Patterns in the Spring Framework: A Comprehensive Overview

This article provides a detailed overview of how the Spring framework implements classic design patterns—including Simple Factory, Factory Method, Singleton, Adapter, Decorator, Proxy, Observer, Strategy, and Template Method—illustrated with code snippets and explanations of their roles in Spring's dependency injection and bean lifecycle management.

Dependency InjectionJavaSingleton
0 likes · 14 min read
Design Patterns in the Spring Framework: A Comprehensive Overview
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 21, 2021 · Backend Development

Mastering Spring @Autowired: 9 Powerful Injection Techniques

This guide explains how Spring's @Autowired annotation works across constructors, methods, fields, arrays, collections, maps, optional dependencies, and built‑in Spring components, providing code examples and tips for handling required and optional beans in a Spring 5.2.15 environment.

AutowiredBackend DevelopmentDependency Injection
0 likes · 7 min read
Mastering Spring @Autowired: 9 Powerful Injection Techniques
Programmer DD
Programmer DD
Jul 20, 2021 · Backend Development

Understanding @Autowired, @Resource, and @Inject: When and How to Use Spring DI Annotations

This article explains the differences between Spring's @Autowired, @Resource, and @Inject annotations, describes the injection order and rules, shows code examples for each approach, and discusses why constructor‑based injection is recommended over field injection for cleaner, more maintainable applications.

AutowiredConstructor InjectionDependency Injection
0 likes · 13 min read
Understanding @Autowired, @Resource, and @Inject: When and How to Use Spring DI Annotations
Top Architect
Top Architect
Jul 18, 2021 · Backend Development

Understanding the @Autowired Annotation in Spring: Usage, Implementation, and Underlying Mechanics

This article explains the @Autowired annotation in Spring, covering its various usage forms such as constructor, setter, method, field, and collection injection, and delves into the underlying implementation details within Spring's AutowiredAnnotationBeanPostProcessor, including metadata handling, reflection-based injection, and common pitfalls.

AutowiredBackend DevelopmentDependency Injection
0 likes · 19 min read
Understanding the @Autowired Annotation in Spring: Usage, Implementation, and Underlying Mechanics
Tencent Cloud Middleware
Tencent Cloud Middleware
Jul 13, 2021 · Backend Development

Why Kratos Is the Go Microservice Framework You Need: Protobuf, DI, and OpenTelemetry Explained

This article introduces the lightweight Go microservice framework Kratos, covering its Protobuf‑driven API design, open and extensible architecture, logging and tracing integrations, functional‑option configuration, unified error model, and compile‑time dependency injection with code examples and diagrams.

Dependency InjectionGoKratos
0 likes · 18 min read
Why Kratos Is the Go Microservice Framework You Need: Protobuf, DI, and OpenTelemetry Explained
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 1, 2021 · Backend Development

Mastering Spring @Scope: Custom Scopes, Prototypes, and Injection Techniques

This guide explains how Spring's @Scope annotation determines bean lifecycles, shows the underlying source code handling singleton and prototype scopes, demonstrates creating and registering a custom scope, and provides practical examples of using custom and prototype-scoped beans with proper proxy configuration in Spring Boot.

Custom ScopeDependency InjectionPrototype
0 likes · 7 min read
Mastering Spring @Scope: Custom Scopes, Prototypes, and Injection Techniques
Code Ape Tech Column
Code Ape Tech Column
Jun 28, 2021 · Backend Development

Understanding and Implementing Spring's @Autowired Annotation

This article explains the various ways to use Spring's @Autowired annotation, examines its underlying implementation via reflection, and provides detailed code examples illustrating field, constructor, setter, and collection injection, while also discussing annotation lifecycle and best practices.

AutowiredDependency InjectionJava
0 likes · 17 min read
Understanding and Implementing Spring's @Autowired Annotation
Top Architect
Top Architect
Jun 27, 2021 · Backend Development

Understanding and Implementing Spring's @Autowired Annotation

This article explains the various ways to use Spring's @Autowired annotation, explores its underlying implementation using reflection, analyzes the core processing classes in the Spring framework, and answers common questions about its lifecycle, bean relationships, and why static injection is discouraged.

AutowiredDependency InjectionJava
0 likes · 17 min read
Understanding and Implementing Spring's @Autowired Annotation
Programmer DD
Programmer DD
Jun 25, 2021 · Backend Development

How Spring Solves Circular Dependencies: Inside the Three‑Level Cache

This article explains why Spring’s default singleton beans can handle circular references, describes the three‑level cache mechanism that makes it possible, shows prototype limitations, provides a minimal implementation example, and even relates the solution to the classic two‑sum algorithm.

Dependency InjectionJavaPrototype
0 likes · 9 min read
How Spring Solves Circular Dependencies: Inside the Three‑Level Cache
Top Architect
Top Architect
Jun 20, 2021 · Backend Development

Understanding Spring IoC (Inversion of Control) and Dependency Injection (DI)

This article explains the concepts of Inversion of Control (IoC) and Dependency Injection (DI) in the Spring framework, describing how containers manage object creation, reduce coupling, improve testability, and embody the Hollywood principle for more flexible Java backend development.

Dependency InjectionIOCInversion of Control
0 likes · 9 min read
Understanding Spring IoC (Inversion of Control) and Dependency Injection (DI)
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.

BeanConfigurationDependency Injection
0 likes · 10 min read
Spring Annotation-Based Bean Registration Guide
Programmer DD
Programmer DD
Jun 14, 2021 · Backend Development

Mastering Spring: Core Concepts, IoC, AOP, and Bean Management Explained

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 LifecycleDependency Injection
0 likes · 45 min read
Mastering Spring: Core Concepts, IoC, AOP, and Bean Management Explained
Top Architect
Top Architect
Jun 13, 2021 · Backend Development

Implementing AOP in a Custom Spring‑like Framework

This article explains the principles and step‑by‑step implementation of Aspect‑Oriented Programming (AOP) in a lightweight Spring‑style container, covering core concepts, advice and pointcut design, weaving mechanisms, proxy creation, observer integration, and practical code examples.

AOPDependency InjectionJava
0 likes · 16 min read
Implementing AOP in a Custom Spring‑like Framework
Architect's Tech Stack
Architect's Tech Stack
Jun 11, 2021 · Backend Development

Guice Dependency Injection: Concepts, Usage, and Best Practices

This article introduces Google Guice, a lightweight dependency‑injection library for Java, explains its core concepts such as bindings, scopes, and assisted injection, demonstrates constructor, method, and field injection with practical code examples, and provides best‑practice recommendations for building testable backend services.

Dependency InjectionJavaguice
0 likes · 10 min read
Guice Dependency Injection: Concepts, Usage, and Best Practices
Java Captain
Java Captain
Jun 5, 2021 · Backend Development

Spring Framework Basics: Core Concepts, Modules, Dependency Injection, Beans, Annotations, AOP, MVC, and Data Access

An extensive overview of the Spring Framework covering its core concepts, version features, lightweight architecture, IoC container, dependency injection methods, bean definitions and scopes, configuration styles, annotation usage, AOP principles, MVC workflow, data access mechanisms, and related implementation details with code examples.

AOPDependency InjectionJava
0 likes · 19 min read
Spring Framework Basics: Core Concepts, Modules, Dependency Injection, Beans, Annotations, AOP, MVC, and Data Access
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 DevelopmentBeanDependency Injection
0 likes · 19 min read
Master Spring IoC: From Bean Creation to Dependency Injection
Programmer DD
Programmer DD
May 19, 2021 · Backend Development

Can You Build a Mini Spring Framework from Scratch? A Step‑by‑Step Guide

This article explains Spring's core concepts such as IOC, DI, and AOP, demonstrates building a simple Hello World with SpringBoot, then shows how to recreate the same functionality using raw Servlets and a handcrafted mini‑Spring framework with full code examples.

Dependency InjectionInversion of ControlJava
0 likes · 20 min read
Can You Build a Mini Spring Framework from Scratch? A Step‑by‑Step Guide
Python Programming Learning Circle
Python Programming Learning Circle
May 10, 2021 · Backend Development

Functional Dependency Injection in Python: From Simple Thresholds to Contextual Composition

This article explores how to combine typed functional concepts with traditional object‑oriented dependency injection in Python, using a Django‑based word‑guessing game to illustrate naive parameter passing, its drawbacks, and a functional approach based on factories, transparent dependencies, and static typing.

Dependency InjectionFunctional Programmingsoftware architecture
0 likes · 11 min read
Functional Dependency Injection in Python: From Simple Thresholds to Contextual Composition
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.

BeanDependency InjectionIOC
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.

BeanDependency InjectionIOC
0 likes · 16 min read
Understanding the Spring Bean Instantiation Process
Programmer DD
Programmer DD
Apr 16, 2021 · Backend Development

Demystifying Spring IoC and Dependency Injection: A Clear Guide for Beginners

This article explains the core concepts of Spring's Inversion of Control (IoC) and Dependency Injection (DI), illustrating how a container takes over object creation and wiring, why this reversal improves modularity and testability, and how the two ideas are essentially two views of the same design principle.

Dependency InjectionIOCJava
0 likes · 10 min read
Demystifying Spring IoC and Dependency Injection: A Clear Guide for Beginners
Intelligent Backend & Architecture
Intelligent Backend & Architecture
Apr 12, 2021 · Backend Development

Mastering Spring MVC: Core Concepts, Components, and Annotations Explained

This comprehensive guide explains Spring MVC's MVC architecture, key components like DispatcherServlet and HandlerMapping, request processing flow, transaction management options, and essential annotations such as @Controller, @RequestMapping, @Autowired, and @Transactional, providing Java web developers with a clear, practical overview.

Dependency InjectionJavaTransaction Management
0 likes · 38 min read
Mastering Spring MVC: Core Concepts, Components, and Annotations Explained
Java Backend Technology
Java Backend Technology
Apr 8, 2021 · Backend Development

Why Field Injection in Spring Is Discouraged and What to Use Instead

This article explains Spring's warning about field injection, compares constructor, setter, and field injection methods, outlines the drawbacks of field injection, and recommends using constructor or setter injection for safer, more maintainable Java applications.

Constructor InjectionDependency InjectionField Injection
0 likes · 7 min read
Why Field Injection in Spring Is Discouraged and What to Use Instead
IT Architects Alliance
IT Architects Alliance
Apr 3, 2021 · Frontend Development

How Baidu Re‑engineered Its Mobile Search Front‑End Architecture for Scale

This article analyzes Baidu's mobile search front‑end architecture evolution, identifying scalability and maintainability challenges, outlining a three‑layer redesign strategy, and detailing concrete modularization, componentization, and SSR techniques that other large‑scale web teams can apply.

BaiduComponentizationDependency Injection
0 likes · 14 min read
How Baidu Re‑engineered Its Mobile Search Front‑End Architecture for Scale