Tagged articles

Dependency Injection

514 articles · Page 2 of 6
macrozheng
macrozheng
Mar 6, 2025 · Backend Development

Dynamic Service Switching in Spring Boot Using spring‑smart‑di

This article explains how to implement dynamic switching of service implementations in a Spring Boot application by leveraging the spring‑smart‑di library, covering configuration setup, custom annotations, and code examples that enable runtime changes without restarting the service.

Dependency InjectionSpring Bootdynamic-configuration
0 likes · 8 min read
Dynamic Service Switching in Spring Boot Using spring‑smart‑di
Java Backend Technology
Java Backend Technology
Mar 4, 2025 · Backend Development

When Are Service‑Layer Interfaces Really Needed?

This article examines the three classic reasons for defining interfaces on Service and DAO layers, explains why they often fall short when using Spring's dependency injection, and offers practical structuring and workflow tips for projects that may or may not require multiple implementations.

Dependency InjectionInterfaceSpring
0 likes · 8 min read
When Are Service‑Layer Interfaces Really Needed?
Top Architecture Tech Stack
Top Architecture Tech Stack
Feb 27, 2025 · Fundamentals

Understanding the Facade Design Pattern and Its Application in Spring Boot

This article explains the Facade design pattern, illustrating its purpose of simplifying complex systems with real‑world analogies, detailing its benefits, showing UML class diagram relationships, and providing a comprehensive Spring Boot example that encapsulates flight, hotel, and package services behind a BookingFacade, while also including promotional content for IDE licenses.

Dependency InjectionFacade PatternSpring Boot
0 likes · 15 min read
Understanding the Facade Design Pattern and Its Application in Spring Boot
Architect's Journey
Architect's Journey
Feb 24, 2025 · Backend Development

Why I Stopped Using Spring’s @Autowired and Adopted Explicit Dependency Management

The article explains how automatic @Autowired injection can tightly couple domain models to the Spring container, hide dependencies, hinder testing, create circular‑dependency risks, and violate clean architecture, then demonstrates an explicit‑dependency approach with a custom SpringContext utility, compares both methods, and offers practical guidelines for layered design and testing.

AutowiredDDDDependency Injection
0 likes · 7 min read
Why I Stopped Using Spring’s @Autowired and Adopted Explicit Dependency Management
JavaScript
JavaScript
Feb 10, 2025 · Frontend Development

8 Essential Modularization Techniques to Master Large Frontend Projects

This article presents eight practical modularization strategies—including ES Modules, componentization, separation of concerns, conventions, bundlers, dependency injection, lazy loading, and versioning—to help developers transform sprawling frontend codebases into clean, reusable, and maintainable systems.

Component ArchitectureDependency InjectionES Modules
0 likes · 8 min read
8 Essential Modularization Techniques to Master Large Frontend Projects
Alibaba Cloud Developer
Alibaba Cloud Developer
Feb 8, 2025 · Backend Development

Unlocking Spring’s Core: A Deep Dive into the IOC Container Mechanics

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

BeanFactoryDependency InjectionIOC
0 likes · 52 min read
Unlocking Spring’s Core: A Deep Dive into the IOC Container Mechanics
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 2, 2025 · Mobile Development

Why Koin Is More Suitable Than Hilt for Dependency Injection in Modern Android Development

The article explains the principles of dependency injection, compares the DI frameworks Koin and Hilt in terms of integration difficulty, performance, cross‑platform support, IDE tooling, and maintenance, and concludes that Koin offers a simpler, lighter, and more versatile solution for Android and multiplatform projects.

AndroidDI FrameworkDependency Injection
0 likes · 11 min read
Why Koin Is More Suitable Than Hilt for Dependency Injection in Modern Android Development
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jan 16, 2025 · Backend Development

Mastering Spring’s @Lazy: Speed Up Startup and Solve Circular Dependencies

This article introduces Spring's @Lazy annotation, explains its purpose and scenarios such as improving startup speed, breaking circular dependencies, and correctly injecting prototype beans, and provides five practical code examples while also announcing a continuously updated Spring Boot 3 case collection with a PDF ebook and source code.

@LazyDependency InjectionSpring Boot
0 likes · 10 min read
Mastering Spring’s @Lazy: Speed Up Startup and Solve Circular Dependencies
Selected Java Interview Questions
Selected Java Interview Questions
Jan 8, 2025 · Backend Development

Understanding Spring Dependency Injection: Constructor, Setter, and Field Injection

This article explains why Spring Framework discourages field injection with @Autowired, compares constructor, setter, and field injection types, provides code examples for each, and discusses the drawbacks of field injection such as immutability issues, violation of single‑responsibility principle, tight coupling to the container, and hidden dependencies.

AutowiredConstructor InjectionDependency Injection
0 likes · 8 min read
Understanding Spring Dependency Injection: Constructor, Setter, and Field Injection
Java Tech Enthusiast
Java Tech Enthusiast
Jan 7, 2025 · Backend Development

Using @Import for Modular Spring Boot Development

Spring Boot enables modular backend development by placing each feature in its own Maven module and using @Import (or custom annotations, ImportSelector, ImportBeanDefinitionRegistrar, and @ConditionalOnProperty) to load configuration classes, scan components, and conditionally register beans while keeping the application a single monolithic program.

Dependency InjectionImport AnnotationJava
0 likes · 19 min read
Using @Import for Modular Spring Boot Development
Architect
Architect
Jan 6, 2025 · Backend Development

Unlocking Java Plugin Architecture: From SPI to Spring Factories

This article explains why plugin mechanisms improve modularity, extensibility, and third‑party integration, then walks through practical Java SPI implementations, custom configuration loading, and Spring Boot’s spring.factories approach, providing complete code examples and step‑by‑step guidance for building a robust plugin system.

Dependency InjectionJavaSPI
0 likes · 21 min read
Unlocking Java Plugin Architecture: From SPI to Spring Factories
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jan 2, 2025 · Backend Development

7 Essential Spring Boot 3 Practices Every Backend Developer Should Know

This article highlights seven often‑overlooked Spring Boot 3 details—ranging from dependency injection and controller design to configuration, constructor simplicity, environment profiles, exception handling, and response handling—providing concrete code examples and best‑practice recommendations to improve code quality and maintainability.

Backend DevelopmentConfigurationDependency Injection
0 likes · 10 min read
7 Essential Spring Boot 3 Practices Every Backend Developer Should Know
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Dec 29, 2024 · Backend Development

Deep Dive into Spring's @Autowired Annotation: Implementation and Injection Mechanism

This article provides a comprehensive analysis of Spring's @Autowired annotation, explaining its purpose, usage in constructor, field, and method injection, and detailing the underlying bean post‑processor logic, dependency resolution, and candidate selection that enable automatic dependency injection.

AutowiredBeanPostProcessorDependency Injection
0 likes · 10 min read
Deep Dive into Spring's @Autowired Annotation: Implementation and Injection Mechanism
Java Backend Technology
Java Backend Technology
Dec 26, 2024 · Backend Development

Unlock Cleaner Java Code: Master Lombok’s @Delegate, @Cleanup, @Builder & More

Explore how Lombok’s powerful annotations—@onX, @Delegate, @Cleanup, @Singular, and @Builder—can dramatically simplify Java code, enable seamless Spring dependency injection, manage resources automatically, and streamline object construction, while highlighting best practices and potential pitfalls for maintainable backend development.

Dependency InjectionLombokSpring
0 likes · 8 min read
Unlock Cleaner Java Code: Master Lombok’s @Delegate, @Cleanup, @Builder & More
Top Architect
Top Architect
Dec 22, 2024 · Backend Development

Do Service Layers Need Interfaces? A Critical Discussion on Spring‑Based Projects

The article examines whether a Service layer in a Spring‑based backend should be defined by interfaces, debunks common arguments for using interfaces, proposes a top‑down coding workflow, explores project structures for single and multiple implementations, and concludes that interfaces are only worthwhile when multiple implementations are required, while also containing promotional material for unrelated services.

Dependency InjectionInterfacesbackend-architecture
0 likes · 11 min read
Do Service Layers Need Interfaces? A Critical Discussion on Spring‑Based Projects
Architecture Digest
Architecture Digest
Dec 19, 2024 · Backend Development

Comprehensive Overview of Spring Bean Lifecycle Extension Points

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 LifecycleDependency InjectionJava
0 likes · 18 min read
Comprehensive Overview of Spring Bean Lifecycle Extension Points
Open Source Tech Hub
Open Source Tech Hub
Dec 15, 2024 · Backend Development

Mastering PHP IoC: Build a Singleton Container from Scratch

This tutorial explains how to create a lightweight Inversion of Control (IoC) container in PHP, covering the singleton pattern, binding services, PSR‑11 compliance, retrieving and injecting dependencies, and implementing class and method resolvers with practical code examples.

Dependency InjectionIOCPHP
0 likes · 16 min read
Mastering PHP IoC: Build a Singleton Container from Scratch
Sohu Tech Products
Sohu Tech Products
Dec 11, 2024 · Mobile Development

Understanding the Repository Pattern in Flutter

The Repository pattern in Flutter abstracts data access behind a type‑safe interface, isolating domain models from API, database, or device details, enabling easy swapping of implementations, simplifying testing with mocks, and promoting clean architecture by keeping UI code separate from business and networking logic.

DARTDependency InjectionFlutter
0 likes · 15 min read
Understanding the Repository Pattern in Flutter
Architecture Digest
Architecture Digest
Nov 29, 2024 · Backend Development

Dynamic Service Provider Switching with Spring Smart DI

This article explains how to implement runtime switching of multiple service providers in a Spring‑based backend by configuring the active implementation in a central store and using the spring‑smart‑di library's AutowiredProxySPI to inject the appropriate bean automatically.

Dependency InjectionJavaSpring
0 likes · 7 min read
Dynamic Service Provider Switching with Spring Smart DI
Architecture Digest
Architecture Digest
Nov 5, 2024 · Backend Development

Spring Annotation-Based Development and MyBatis Integration Tutorial

This article explains how Spring 3.0's pure annotation mode simplifies bean configuration, demonstrates using @Component, @Scope, @Autowired, @Qualifier, @Value, and @PropertySource for dependency injection and property loading, and shows step‑by‑step integration of MyBatis with Spring, including required dependencies and configuration classes.

ConfigurationDependency InjectionJava
0 likes · 8 min read
Spring Annotation-Based Development and MyBatis Integration Tutorial
Java Architect Essentials
Java Architect Essentials
Oct 25, 2024 · Backend Development

Using Lombok Annotations @RequiredArgsConstructor, @Delegate, @Cleanup, @Singular and @Builder in Spring Applications

This article demonstrates how Lombok annotations such as @RequiredArgsConstructor, @Delegate, @Cleanup, @Singular, and @Builder can be combined with Spring components to reduce boilerplate, automatically inject dependencies, manage resources, and build immutable objects, providing practical code examples and usage guidelines.

Dependency InjectionJavaLombok
0 likes · 7 min read
Using Lombok Annotations @RequiredArgsConstructor, @Delegate, @Cleanup, @Singular and @Builder in Spring Applications
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Oct 8, 2024 · Frontend Development

Understanding Inversion of Control (IoC) and Dependency Injection in Front‑End Development

This article explains the Inversion of Control (IoC) principle, why it matters for growing front‑end applications, and demonstrates how to refactor a simple App component using dependency injection and a module registration system, turning the App into a container that manages its dependencies rather than directly instantiating them.

Dependency InjectionIOCJavaScript
0 likes · 7 min read
Understanding Inversion of Control (IoC) and Dependency Injection in Front‑End Development
Code Ape Tech Column
Code Ape Tech Column
Oct 7, 2024 · Backend Development

Dynamic Service Provider Switching with spring-smart-di and AutowiredProxySPI

This article explains how to implement runtime switching of multiple service providers, such as SMS vendors, in a Spring-based backend using the spring‑smart‑di library, @EnvironmentProxySPI, and @AutowiredProxySPI annotations, with configuration stored in Nacos, databases, or environment variables.

Dependency InjectionDynamic SwitchingJava
0 likes · 8 min read
Dynamic Service Provider Switching with spring-smart-di and AutowiredProxySPI
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Sep 23, 2024 · Backend Development

Mastering Spring Bean Lifecycle: 8 Essential Stages Explained

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.

Backend DevelopmentBean LifecycleDependency Injection
0 likes · 5 min read
Mastering Spring Bean Lifecycle: 8 Essential Stages Explained
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Sep 16, 2024 · Backend Development

Mastering Spring’s IOC Container: Concepts, Types, and Startup Steps

This article explains the Inversion of Control principle, defines what an IOC container is, compares Spring’s BeanFactory and ApplicationContext, and walks through the three-stage startup process—including loading configurations, registering bean definitions, and instantiating beans with automatic dependency injection.

Backend DevelopmentDependency InjectionIOC
0 likes · 5 min read
Mastering Spring’s IOC Container: Concepts, Types, and Startup Steps
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Sep 9, 2024 · Backend Development

Master Spring Boot Annotations: @SpringBootApplication, @RestController, @Autowired & More

This article explains the most commonly used Spring Boot annotations—including @SpringBootApplication, @RestController, @RequestMapping, @Autowired, @Value, @Component, @Service, @Repository, and @Configuration—providing clear descriptions and practical code examples for each.

Backend DevelopmentDependency InjectionJava
0 likes · 4 min read
Master Spring Boot Annotations: @SpringBootApplication, @RestController, @Autowired & More
Architect
Architect
Sep 4, 2024 · Backend Development

Unlocking Spring Bean Lifecycle: 17 Extension Points Every Developer Should Master

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.

Bean LifecycleDependency InjectionJava
0 likes · 20 min read
Unlocking Spring Bean Lifecycle: 17 Extension Points Every Developer Should Master
Architect
Architect
Sep 3, 2024 · Frontend Development

Designing a Reusable, Flexible, and Stable Detail Page Framework

This article analyzes the challenges of maintaining high‑traffic detail pages across multiple business teams and proposes a three‑layer, dependency‑injection‑enabled framework that ensures reusability, flexibility, and stability while supporting fast onboarding and robust quality assurance.

Dependency Injectionfrontendmodularization
0 likes · 10 min read
Designing a Reusable, Flexible, and Stable Detail Page Framework
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Aug 30, 2024 · Backend Development

Master the 9 Essential SpringBoot Annotations for Backend Development

This article provides a concise yet comprehensive guide to the most common SpringBoot annotations—including @SpringBootApplication, @EnableAutoConfiguration, @ComponentScan, @Service, @Repository, @Component, @RestController, @Bean, @ResponseBody, and @Autowired—explaining their purpose, composition, and practical code examples for building robust Java backend applications.

Backend DevelopmentDependency InjectionJava
0 likes · 6 min read
Master the 9 Essential SpringBoot Annotations for Backend Development
Architect's Guide
Architect's Guide
Aug 19, 2024 · Fundamentals

Applying the Strategy Pattern with Simple Factory in a Java Backend Service

This article explains how to use the Strategy pattern combined with a simple factory in a Spring‑based Java backend, showing interface definition, multiple arithmetic strategy implementations, a factory that registers them in a map, a service that selects a strategy at runtime, and a REST controller for testing.

Dependency InjectionFactoryJava
0 likes · 6 min read
Applying the Strategy Pattern with Simple Factory in a Java Backend Service
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Aug 19, 2024 · Backend Development

Why Field Injection in Spring Is Risky and How Constructor Injection Solves It

The article explains how field injection in Spring can cause null‑pointer exceptions, break immutability, violate design principles, and hide circular dependencies, and demonstrates that using constructor injection (with optional @Lazy) provides safer, more maintainable dependency management.

Constructor InjectionDependency InjectionField Injection
0 likes · 7 min read
Why Field Injection in Spring Is Risky and How Constructor Injection Solves It
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Aug 16, 2024 · Backend Development

Understanding IOC vs Dependency Injection in Spring: Key Differences Explained

This article clarifies how Inversion of Control (IoC) serves as a design pattern that hands control to an external container, while Dependency Injection (DI) is a concrete IoC implementation that automatically supplies required objects, detailing their definitions, purposes, implementations, and typical usage scenarios.

Backend DevelopmentDependency InjectionInversion of Control
0 likes · 4 min read
Understanding IOC vs Dependency Injection in Spring: Key Differences Explained
php Courses
php Courses
Aug 15, 2024 · Backend Development

Applying the Interface Programming Principle in Laravel: From SMS to Email Notifications

This article explains the interface‑programming principle, demonstrates its benefits with SMS and email notification services in Laravel, shows how to refactor code using an INotification interface, and configures the service container to switch implementations seamlessly, illustrating a flexible, maintainable backend design.

Dependency InjectionPHPService Container
0 likes · 8 min read
Applying the Interface Programming Principle in Laravel: From SMS to Email Notifications
Top Architect
Top Architect
Aug 12, 2024 · Backend Development

Why Field Injection Is Discouraged in Spring and Preferred Alternatives

The article explains that Spring no longer recommends @Autowired field injection, describes constructor‑based, setter‑based, and field‑based dependency injection types, illustrates each with code examples, and outlines the drawbacks of field injection such as immutability issues, SRP violations, and tight coupling to the container.

Backend DevelopmentConstructor InjectionDependency Injection
0 likes · 11 min read
Why Field Injection Is Discouraged in Spring and Preferred Alternatives
Java Architect Essentials
Java Architect Essentials
Aug 6, 2024 · Backend Development

Why Spring Discourages Field Injection: A Comparison of Constructor, Setter, and Field Injection

The article explains why Spring discourages field injection, compares constructor, setter, and field injection types, provides Java code examples, and outlines the drawbacks of field injection such as immutability issues, SRP violations, container coupling, and hidden dependencies.

Constructor InjectionDependency InjectionField Injection
0 likes · 9 min read
Why Spring Discourages Field Injection: A Comparison of Constructor, Setter, and Field Injection
Java Tech Enthusiast
Java Tech Enthusiast
Aug 5, 2024 · Backend Development

Implementing SPI-like Extensions in Spring Boot

Spring Boot can emulate SPI plug‑in extensions by using native Java ServiceLoader, conditional bean registration with @ConditionalOnClass/@ConditionalOnProperty, custom FactoryBean implementations, or programmatic BeanDefinitionRegistryPostProcessor registration, each enabling dynamic service loading based on configuration or runtime conditions.

Dependency InjectionJavaSPI
0 likes · 7 min read
Implementing SPI-like Extensions in Spring Boot
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Aug 4, 2024 · Backend Development

Enable Spring Dependency Injection for New Objects with @Configurable

This guide explains how to use Spring's @Configurable annotation and the AnnotationBeanConfigurerAspect to inject dependencies into objects created with new, covering environment setup, Maven configuration, AspectJ weaving, and advanced options like autowiring, constructor injection, and dependency checks.

AspectJBackend DevelopmentConfigurable
0 likes · 8 min read
Enable Spring Dependency Injection for New Objects with @Configurable
Selected Java Interview Questions
Selected Java Interview Questions
Aug 1, 2024 · Backend Development

Spring Annotation-Based Development and MyBatis Integration Guide

This article explains how Spring 3.0's pure annotation development simplifies bean configuration, demonstrates defining beans with @Component, managing bean scopes, performing various injection techniques, reading properties files, and integrating MyBatis, providing complete code examples and best‑practice tips for backend Java developers.

AnnotationDependency InjectionJava
0 likes · 11 min read
Spring Annotation-Based Development and MyBatis Integration Guide
FunTester
FunTester
Aug 1, 2024 · Backend Development

Mastering Advanced fx Features: Invoke, Supply, Populate, and More

This article dives deep into Uber's fx dependency‑injection framework for Go, explaining advanced constructs such as fx.Invoke, fx.Supply, fx.Populate, fx.Annotated, fx.In, fx.Out, fx.Module, fx.WithLogger and fx.As, and provides complete code examples that illustrate how to manage lifecycles, inject static values, differentiate multiple implementations, and customize logging in production‑grade applications.

Backend DevelopmentDependency InjectionGo
0 likes · 13 min read
Mastering Advanced fx Features: Invoke, Supply, Populate, and More
Java Backend Technology
Java Backend Technology
Jul 30, 2024 · Backend Development

Spring Annotation Development: From Bean Definition to MyBatis Integration

This article explains how Spring’s pure annotation development replaces XML bean definitions, covers component scanning, bean scopes, derived annotations, various injection methods, property file loading, and demonstrates seamless Spring‑MyBatis integration, showing step‑by‑step code examples that simplify backend configuration.

AnnotationDependency InjectionJava
0 likes · 9 min read
Spring Annotation Development: From Bean Definition to MyBatis Integration
FunTester
FunTester
Jul 29, 2024 · Backend Development

Mastering Dependency Injection in Go with Uber’s Fx Framework

This article explains the core concepts of dependency injection, introduces Uber’s Fx framework for Go, and provides step‑by‑step code examples that demonstrate how to register providers, manage application lifecycles, and use hooks for start‑up and shutdown logic.

Backend DevelopmentDependency InjectionGo
0 likes · 12 min read
Mastering Dependency Injection in Go with Uber’s Fx Framework
DaTaobao Tech
DaTaobao Tech
Jul 22, 2024 · Backend Development

Spring Bean Injection Issues and Dependency Injection Priorities

In a project with two applications, a Tair bean defined via JavaConfig works in one app but fails in the other because Spring’s injection rules prioritize type over name, causing ambiguity; using explicit bean naming with XML, adding @Qualifier, or switching to @Resource resolves the issue.

Bean ConfigurationDependency InjectionJava
0 likes · 12 min read
Spring Bean Injection Issues and Dependency Injection Priorities
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jul 18, 2024 · Mobile Development

Comprehensive Guide to GetX in Flutter: State Management, Routing, Dependency Injection, and Practical Project Implementation

This article provides an in‑depth tutorial on using the GetX library for Flutter, covering its state‑management, routing, dependency‑injection features, code generation tricks, common pitfalls, and a step‑by‑step rewrite of a WanAndroid project with practical examples.

Dependency InjectionGetXMobile Development
0 likes · 40 min read
Comprehensive Guide to GetX in Flutter: State Management, Routing, Dependency Injection, and Practical Project Implementation
Bilibili Tech
Bilibili Tech
Jul 12, 2024 · Frontend Development

Design and Implementation of a Unified Multi‑Business Detail Page Framework

The project consolidates three separate detail‑page implementations into a single, reusable framework that separates business, component, and framework layers, employs dependency‑injection and scoped lifecycles to support diverse scenarios while ensuring stability through comprehensive logging, monitoring, and staged gray‑release testing.

Code ReuseDependency InjectionScope Management
0 likes · 11 min read
Design and Implementation of a Unified Multi‑Business Detail Page Framework
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 10, 2024 · Backend Development

Master Spring’s FactoryBean: From Basics to Advanced Use Cases

This article explains Spring's FactoryBean interface, detailing its three core methods, and provides step‑by‑step examples—including a simple bean, prototype scope, proxy creation, accessing the original FactoryBean, and using ServiceFactoryBean for SPI—illustrating how to customize bean instantiation in Spring 6.

Dependency InjectionSPIfactorybean
0 likes · 7 min read
Master Spring’s FactoryBean: From Basics to Advanced Use Cases
IT Architects Alliance
IT Architects Alliance
Jul 2, 2024 · Backend Development

Do You Really Need Interfaces for Service and DAO Layers in Spring?

This article examines whether defining separate interfaces for Service and DAO layers is necessary in Spring projects, debunks common justifications, proposes a bottom‑up development workflow, and outlines project structures for single and multiple implementations, highlighting both benefits and drawbacks.

Dependency InjectionSpringbackend-architecture
0 likes · 8 min read
Do You Really Need Interfaces for Service and DAO Layers in Spring?
21CTO
21CTO
Jul 2, 2024 · Backend Development

FastAPI vs Flask: Why FastAPI Outperforms Flask for Modern APIs

This article compares FastAPI and Flask, highlighting FastAPI's speed, developer experience, and standards support, while providing practical migration guidance, code examples, configuration tips, async handling, dependency injection, testing, deployment, and documentation differences for Python web developers.

ASGIDependency InjectionFastAPI
0 likes · 25 min read
FastAPI vs Flask: Why FastAPI Outperforms Flask for Modern APIs
Architect
Architect
Jun 28, 2024 · Backend Development

Do Service and DAO Layers Really Need Interfaces? A Practical Spring Analysis

This article examines whether defining interfaces for Service and DAO layers is necessary in Spring projects, debunks common arguments for interfaces, proposes a top‑down coding workflow, and outlines strategies for handling multiple implementations without adding unnecessary abstraction.

Backend DevelopmentDependency InjectionInterface
0 likes · 9 min read
Do Service and DAO Layers Really Need Interfaces? A Practical Spring Analysis
Code Ape Tech Column
Code Ape Tech Column
Jun 24, 2024 · Backend Development

Applying the Service Locator Pattern in Spring to Decouple File Parsers

The article explains how to replace tightly‑coupled if‑else or switch statements for selecting CSV, JSON, or XML parsers with a Service Locator Pattern in Spring, showing step‑by‑step code examples, configuration, and the resulting adherence to the open‑closed principle.

Dependency InjectionFactory BeanJava
0 likes · 8 min read
Applying the Service Locator Pattern in Spring to Decouple File Parsers
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 19, 2024 · Backend Development

Mastering Spring Boot Annotations: A Comprehensive Guide for Backend Developers

This article provides a thorough overview of Spring Boot's core, web, configuration, dependency injection, AOP, testing, security, transaction, scheduling, event, exception handling, property binding, and conditional annotations, complete with practical code examples for Java backend development.

Backend DevelopmentDependency InjectionSpring Boot
0 likes · 12 min read
Mastering Spring Boot Annotations: A Comprehensive Guide for Backend Developers
Go Programming World
Go Programming World
Jun 13, 2024 · Backend Development

Using Wire for Dependency Injection in Go Web Applications: A Practical Guide

This article demonstrates how to apply Google’s Wire tool in a production‑grade Go web service, covering project layout, a four‑layer architecture, code generation for constructors, comparisons with dig and inject, and practical CLI usage to streamline dependency injection and improve development efficiency.

Dependency InjectionGoWeb Development
0 likes · 23 min read
Using Wire for Dependency Injection in Go Web Applications: A Practical Guide
Java Tech Enthusiast
Java Tech Enthusiast
Jun 12, 2024 · Backend Development

Understanding Dependency Injection Types in Spring: Constructor, Setter, and Field Injection

The article explains Spring’s three dependency‑injection styles—constructor, setter, and field—showing how constructor injection (often with @Autowired or implicit) enables immutable, required dependencies, setter injection handles optional ones, and field injection, though concise, is discouraged due to immutability, testability, and coupling drawbacks.

Constructor InjectionDependency InjectionField Injection
0 likes · 7 min read
Understanding Dependency Injection Types in Spring: Constructor, Setter, and Field Injection
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 3, 2024 · Backend Development

Why Static Field Injection Fails in Spring 6 and How to Do It Correctly

This article examines why Spring 6 does not support injecting static fields or methods with @Resource, @Autowired, or @Inject, demonstrates the resulting errors, and presents proper ways to inject static dependencies using instance‑method or constructor injection, backed by source‑code analysis of the relevant bean post‑processors.

Backend DevelopmentDependency InjectionStatic Fields
0 likes · 9 min read
Why Static Field Injection Fails in Spring 6 and How to Do It Correctly
Ops Development & AI Practice
Ops Development & AI Practice
Jun 1, 2024 · Backend Development

Mastering Dependency Injection in Go with Google Wire

This article introduces Google Wire, a static‑analysis‑based dependency injection tool for Go, covering its key features, installation steps, core usage patterns—including defining dependencies, creating providers, generating code, and best practices such as modular management, interface abstraction, and testing with mock implementations.

Dependency InjectionGoGoogle Wire
0 likes · 8 min read
Mastering Dependency Injection in Go with Google Wire
Ops Development & AI Practice
Ops Development & AI Practice
Jun 1, 2024 · Backend Development

How to Build a Name Injection Registry in Go for Flexible Plugins

This guide walks through creating a name‑based injection system in Go by defining a processor interface, implementing concrete processors, building a registration map with init functions, and demonstrating usage in a main program, while also covering best practices such as global variable handling, initialization order, and error checking.

Dependency InjectionGoPlugin system
0 likes · 5 min read
How to Build a Name Injection Registry in Go for Flexible Plugins
Ops Development & AI Practice
Ops Development & AI Practice
May 27, 2024 · Backend Development

Decoupling Gin Handlers with Dependency Injection in Go

This article explains how to apply Dependency Injection in the Go Gin framework to separate routing logic from business services, reducing code coupling, improving testability, and enhancing reusability through concrete interface definitions, a simple DI container, and practical code examples.

Dependency InjectionGinGo
0 likes · 6 min read
Decoupling Gin Handlers with Dependency Injection in Go
php Courses
php Courses
May 27, 2024 · Backend Development

Using PHP Traits in Symfony for Reusable and Modular Code

This guide explains how to use PHP Traits within the Symfony framework to encapsulate reusable functionality, demonstrating the creation of a LoggerTrait, its integration into a UserService, and the injection of that service into a controller for clean, modular, and DRY code.

Backend DevelopmentCode ReuseDependency Injection
0 likes · 5 min read
Using PHP Traits in Symfony for Reusable and Modular Code
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 25, 2024 · Backend Development

Understanding Spring's IoC Container: BeanFactory, ListableBeanFactory, HierarchicalBeanFactory, and AutowireCapableBeanFactory

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

Backend DevelopmentBeanFactoryDependency Injection
0 likes · 8 min read
Understanding Spring's IoC Container: BeanFactory, ListableBeanFactory, HierarchicalBeanFactory, and AutowireCapableBeanFactory
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 23, 2024 · Backend Development

Spring Prototype Bean Injection: ServiceLocator vs ObjectFactoryCreating

This article explains how to define and inject prototype-scoped beans in Spring using @Scope, ServiceLocatorFactoryBean, and ObjectFactoryCreatingFactoryBean, demonstrates configuration via annotations and XML, shows code examples, compares the two FactoryBean approaches, and includes tips for bean name mapping and custom exceptions.

Bean ScopeDependency InjectionObjectFactoryCreatingFactoryBean
0 likes · 9 min read
Spring Prototype Bean Injection: ServiceLocator vs ObjectFactoryCreating
Go Programming World
Go Programming World
May 12, 2024 · Backend Development

Resolving MySQL Dependencies in Go Unit Tests with Fake and Mock Objects

This article explains how to write Go unit tests for HTTP handlers that depend on MySQL by using fake implementations and the gomock library to replace the store layer, demonstrating both fake object and mock approaches, code examples, and best practices for isolating external dependencies.

Dependency InjectionFakeGo
0 likes · 18 min read
Resolving MySQL Dependencies in Go Unit Tests with Fake and Mock Objects
Go Development Architecture Practice
Go Development Architecture Practice
May 9, 2024 · Backend Development

How to Organize a Scalable Go Project: Best Practices and Patterns

This guide outlines a comprehensive Go project layout—including cmd, pkg, internal, test, configs, and docs directories—alongside modular design principles, middleware usage, dependency injection, error handling, logging, database access layers, testing strategies, performance tuning, and documentation practices to improve code readability, maintainability, and scalability.

Dependency InjectionGoMiddleware
0 likes · 26 min read
How to Organize a Scalable Go Project: Best Practices and Patterns
macrozheng
macrozheng
May 8, 2024 · Backend Development

Mastering Spring’s @Autowired: Advanced Usage, Qualifiers, and Common Pitfalls

This article explores the default behavior of Spring's @Autowired annotation, how to resolve bean name conflicts, use @Qualifier and @Primary, apply @Autowired on constructors, methods, parameters, and collections, and troubleshoot common issues such as missing annotations, filter injection, component scanning, and circular dependencies.

AutowiredDependency InjectionJava
0 likes · 15 min read
Mastering Spring’s @Autowired: Advanced Usage, Qualifiers, and Common Pitfalls
Java Tech Enthusiast
Java Tech Enthusiast
May 2, 2024 · Backend Development

Why IDEA Warns on @Autowired but Not on @Resource: A Spring DI Overview

IDEA flags @Autowired field injection but not @Resource because Spring advises against field injection—seeing it as tightly coupled and hard to test—while @Resource is a standard JSR‑250 annotation, so the IDE applies the warning only to the Spring‑specific @Autowired usage.

AutowiredDependency InjectionIDEA
0 likes · 5 min read
Why IDEA Warns on @Autowired but Not on @Resource: A Spring DI Overview
Code Ape Tech Column
Code Ape Tech Column
Apr 29, 2024 · Backend Development

Advanced Lombok Annotations: @onX, @Delegate, @Cleanup, @Builder/@Singular, and @With

This article explains several powerful Lombok annotations—including @onX, @Delegate, @Cleanup, @Builder with @Singular, and @With—showing how they simplify Spring‑based Java code through automatic constructor generation, method delegation, resource management, and fluent builders, while also warning against overuse.

Dependency InjectionJavaLombok
0 likes · 7 min read
Advanced Lombok Annotations: @onX, @Delegate, @Cleanup, @Builder/@Singular, and @With
Code Ape Tech Column
Code Ape Tech Column
Apr 27, 2024 · Backend Development

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

This article examines whether every Service and DAO class in a Spring‑based backend should implement an interface, discusses the three traditional reasons for using interfaces, explains why they often do not hold up, and proposes practical structuring alternatives for single‑ and multi‑implementation scenarios.

Dependency InjectionInterfaceJava
0 likes · 8 min read
Do Service and DAO Layers Need Interfaces? When to Use Them in Spring Projects
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Apr 23, 2024 · Backend Development

Understanding @Configuration vs @Component in Spring: Bean Creation and Proxies

This article explains the distinct roles of Spring's @Configuration and @Component annotations, demonstrates their behavior through code examples, compares bean initialization and proxy generation, and reveals how Spring's ConfigurationClassPostProcessor and related enhancers ensure singleton beans across method calls.

ComponentConfigurationDependency Injection
0 likes · 9 min read
Understanding @Configuration vs @Component in Spring: Bean Creation and Proxies
Architect's Tech Stack
Architect's Tech Stack
Apr 16, 2024 · Backend Development

Should the Service Layer Use Interfaces? A Critical Discussion

This article examines whether a Service layer in Java Spring projects truly requires interfaces, debunking common arguments, exploring development workflows without interfaces, discussing project structuring for single and multiple implementations, and concluding when interfaces are beneficial or unnecessary.

Dependency InjectionInterfaceJava
0 likes · 7 min read
Should the Service Layer Use Interfaces? A Critical Discussion
MoonWebTeam
MoonWebTeam
Apr 16, 2024 · Frontend Development

Mastering Dependency Injection in Frontend: Boost Maintainability and Testability

This article explains the concept of Dependency Injection for frontend projects, compares it with Inversion of Control, showcases practical code examples, discusses popular DI libraries and frameworks, and details implementation techniques such as decorators, reflection, singleton handling, and circular dependency resolution to improve maintainability and testability.

Dependency InjectionIOCdesign patterns
0 likes · 26 min read
Mastering Dependency Injection in Frontend: Boost Maintainability and Testability
IT Niuke
IT Niuke
Apr 14, 2024 · Backend Development

Mastering Spring Boot Plugin Development: A Detailed Guide

This article explains why plugin architectures boost modularity, extensibility and third‑party integration, then walks through multiple Java‑based implementation techniques—including ServiceLoader, custom configuration files, and Spring Boot’s spring.factories—showing complete code samples, runtime screenshots and a real‑world microservice case study.

Dependency InjectionJava SPIMicroservices
0 likes · 22 min read
Mastering Spring Boot Plugin Development: A Detailed Guide
Java Tech Enthusiast
Java Tech Enthusiast
Apr 9, 2024 · Backend Development

Understanding Spring DI: @Autowired vs @Resource and Field Injection Pitfalls

Spring supports constructor, setter, and field injection, but field injection is discouraged; @Autowired (Spring‑specific, by‑type) and @Resource (standard, by‑name) differ in defaults and IDE warnings, so prefer constructor injection for required beans, setter injection for optional ones, and only use @Resource for unavoidable field injection to lessen container coupling.

AutowiredDependency InjectionJava
0 likes · 5 min read
Understanding Spring DI: @Autowired vs @Resource and Field Injection Pitfalls
Open Source Tech Hub
Open Source Tech Hub
Feb 29, 2024 · Backend Development

Mastering PHP-DI: A Step‑by‑Step Guide to Dependency Injection in Webman

This tutorial explains what a Dependency Injection (DI) container is, shows how to install php-di, demonstrates basic usage including container creation, automatic wiring, constructor and annotation injection, and provides custom injection techniques for the Webman framework with concrete code examples.

Backend DevelopmentDependency InjectionPHP
0 likes · 9 min read
Mastering PHP-DI: A Step‑by‑Step Guide to Dependency Injection in Webman
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 23, 2024 · Backend Development

Master Spring Boot 2.7: Bean Lifecycle, DI, AOP, Caching & More

This guide walks through essential Spring Boot 2.7.16 features—including bean lifecycle annotations, dependency injection methods, Java‑based configuration, conditional beans, event listeners, AOP, scheduled tasks, data access with Spring Data JPA, caching, exception handling, security, SpEL, configuration management, performance monitoring, and micro‑service components—providing concise code examples for each.

AOPCachingDependency Injection
0 likes · 10 min read
Master Spring Boot 2.7: Bean Lifecycle, DI, AOP, Caching & More
php Courses
php Courses
Feb 8, 2024 · Backend Development

Why Extending Symfony\Bundle\FrameworkBundle\Controller\Controller Is Discouraged and How AbstractController Improves Dependency Injection

The article explains that directly extending Symfony's Controller class leads to tight coupling and testing issues, and recommends using the AbstractController with proper dependency injection to achieve cleaner, more maintainable backend code in Symfony applications.

Dependency InjectionPHPbackend
0 likes · 6 min read
Why Extending Symfony\Bundle\FrameworkBundle\Controller\Controller Is Discouraged and How AbstractController Improves Dependency Injection
Java Tech Enthusiast
Java Tech Enthusiast
Feb 7, 2024 · Backend Development

How Does Spring’s @Autowired Really Work? A Deep Dive into Its Implementation

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.

Annotation ProcessingAutowiredBean Lifecycle
0 likes · 27 min read
How Does Spring’s @Autowired Really Work? A Deep Dive into Its Implementation
Architect
Architect
Feb 5, 2024 · Backend Development

Applying the Strategy Pattern with Simple Factory in a Spring Boot Application

This article demonstrates how to apply the Strategy pattern combined with a simple factory in a Spring Boot application, showing interface definition, multiple arithmetic strategy implementations, a factory that registers beans, a service invoking strategies via a map, and a REST controller for testing, highlighting extensibility.

Dependency InjectionFactoryJava
0 likes · 8 min read
Applying the Strategy Pattern with Simple Factory in a Spring Boot Application
FunTester
FunTester
Feb 5, 2024 · Backend Development

How to Write Testable Business Code in Go: From Pure Functions to Dependency Injection

This article explains why unit testing is often seen as burdensome in long‑running Go projects and provides practical techniques—such as using pure functions, extracting dependencies, object‑oriented design, and function variableization—to make business code easy to test and maintain.

Dependency InjectionGoPure Functions
0 likes · 16 min read
How to Write Testable Business Code in Go: From Pure Functions to Dependency Injection
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jan 30, 2024 · Backend Development

Master Spring Boot Bean Lifecycle: Init, Destroy, Scopes & Advanced Tricks

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.

Backend DevelopmentBean LifecycleDependency Injection
0 likes · 9 min read
Master Spring Boot Bean Lifecycle: Init, Destroy, Scopes & Advanced Tricks
Tencent Cloud Developer
Tencent Cloud Developer
Jan 25, 2024 · Backend Development

How to Write Testable Business Code in Go: A Practical Guide

The guide shows that by consciously designing Go data structures and function interfaces—using pure functions, parameter injection, interface abstractions, struct‑based objects, or function‑variable patterns—and avoiding init(), developers can expose and control all dependencies, making business code inherently testable and achieving high unit‑test coverage.

Backend DevelopmentDependency InjectionGo
0 likes · 17 min read
How to Write Testable Business Code in Go: A Practical Guide