Tagged articles

dependency injection

526 articles · Page 2 of 6
Code Mala Tang
Code Mala Tang
Apr 24, 2025 · Backend Development

Mastering Dependency Injection in FastAPI: From Basics to Advanced Use

This article explains how FastAPI leverages Dependency Injection to improve code reusability, modularity, and testability, covering basic examples, sub‑dependency handling, database session management with SQLAlchemy, and building a full‑featured user management API with authentication.

PythonWeb APIbackend development
0 likes · 9 min read
Mastering Dependency Injection in FastAPI: From Basics to Advanced Use
Top Architect
Top Architect
Apr 17, 2025 · Backend Development

Plugin Architecture in Java: Implementing Modular Extensions with ServiceLoader, Spring Factories, and Custom Configurations

This article explains how to design and implement a plugin mechanism in Java and Spring Boot, covering the benefits of modular decoupling, common implementation patterns such as ServiceLoader and custom configuration files, and practical code examples for building extensible backend services.

Modular DesignPlugin architectureServiceLoader
0 likes · 23 min read
Plugin Architecture in Java: Implementing Modular Extensions with ServiceLoader, Spring Factories, and Custom Configurations
php Courses
php Courses
Apr 10, 2025 · Backend Development

Common Design Patterns in PHP Web Service Development

This article introduces essential design patterns for PHP web service development, such as Factory, Singleton, Observer, Strategy, and Dependency Injection, explains their implementation with code examples, discusses their benefits for code reuse, maintainability, and scalability, and offers guidance on selecting appropriate patterns in modern PHP frameworks.

Design PatternsFactory PatternPHP
0 likes · 8 min read
Common Design Patterns in PHP Web Service Development
Architecture Digest
Architecture Digest
Mar 17, 2025 · Backend Development

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

This article explains how to dynamically switch between multiple service providers in a Spring backend by configuring identifiers, using spring-smart-di's AutowiredProxySPI and related annotations, and provides step‑by‑step code examples for seamless, runtime‑configurable dependency injection.

Dynamic ConfigurationSpringdependency injection
0 likes · 9 min read
Dynamic Service Provider Switching with spring-smart-di and AutowiredProxySPI
Architecture Digest
Architecture Digest
Mar 10, 2025 · Backend Development

Implementing a Plugin Architecture in Java and Spring Boot Using SPI and Spring Factories

This article explains how to design and implement a flexible plugin mechanism for Java applications, covering the benefits of decoupling, common implementation strategies such as ServiceLoader (SPI), custom configuration loading, and Spring Boot integration via spring.factories, with complete code examples and a real‑world case study.

SPISpring Bootdependency injection
0 likes · 19 min read
Implementing a Plugin Architecture in Java and Spring Boot Using SPI and Spring Factories
Code Ape Tech Column
Code Ape Tech Column
Mar 10, 2025 · Backend Development

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

This article explains how to dynamically switch between multiple service providers, such as SMS vendors, in a Spring‑based backend by using spring‑smart‑di's @AutowiredProxySPI and related annotations, covering configuration, Maven dependency, enabling the feature, and custom proxy implementations.

Dynamic ConfigurationSpringbackend
0 likes · 9 min read
Dynamic Service Provider Switching with spring-smart-di and AutowiredProxySPI
JD Tech Talk
JD Tech Talk
Mar 7, 2025 · Fundamentals

Understanding Java Service Provider Interface (SPI): Introduction, Example, and Implementation Details

This article introduces Java's Service Provider Interface (SPI), demonstrates a step‑by‑step example with multiple Maven modules, explains how to create interface and implementation classes, configure META‑INF/services files, and delves into the ServiceLoader internals that enable runtime discovery and instantiation of providers.

Design PatternsSPIServiceLoader
0 likes · 9 min read
Understanding Java Service Provider Interface (SPI): Introduction, Example, and Implementation Details
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.

Dynamic ConfigurationSpring Bootdependency injection
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.

Service LayerSpringbackend
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.

Design PatternsFacade 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.

AutowiredDDDExplicit Dependencies
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 ArchitectureES ModulesFrontend
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.

BeanFactoryDesign PatternsIoC
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 FrameworkHilt
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.

@LazySpring Bootdependency injection
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 InjectionField 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.

Import AnnotationMavenModular Development
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.

Plugin architectureSPISpring Boot
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.

ConfigurationSpring Bootbackend development
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.

AutowiredBeanPostProcessorSpring
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.

LombokSpringannotations
0 likes · 8 min read
Unlock Cleaner Java Code: Master Lombok’s @Delegate, @Cleanup, @Builder & More
Code Ape Tech Column
Code Ape Tech Column
Dec 25, 2024 · Fundamentals

Applying the Service Locator Pattern for Extensible File Parsers in Spring

This article demonstrates how to replace tightly‑coupled if‑else or switch‑case logic with the Service Locator Pattern in a Spring application, allowing new file‑type parsers such as XML to be added without modifying client code, thereby adhering to the Open/Closed principle.

Factory BeanOpen-Closed PrincipleService Locator
0 likes · 7 min read
Applying the Service Locator Pattern for Extensible File Parsers in Spring
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.

Backend ArchitectureService Layerdependency injection
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 LifecycleSpringSpring Boot
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.

IoCPHPPSR-11
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
Programmer1970
Programmer1970
Dec 8, 2024 · Backend Development

Advanced Spring Interview Questions: Bean Lifecycle, AOP, Transactions, ApplicationContext vs BeanFactory, Type Conversion

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

AOPBean LifecycleSpring
0 likes · 21 min read
Advanced Spring Interview Questions: Bean Lifecycle, AOP, Transactions, ApplicationContext vs BeanFactory, Type Conversion
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.

Dynamic ConfigurationSpringdependency injection
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.

ConfigurationMyBatisSpring
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.

LombokSpringannotations
0 likes · 7 min read
Using Lombok Annotations @RequiredArgsConstructor, @Delegate, @Cleanup, @Singular and @Builder in Spring Applications
Programmer1970
Programmer1970
Oct 9, 2024 · Backend Development

Spring Bean Creation: BeanDefinition vs FactoryBean Explained

The article compares Spring's BeanDefinition and FactoryBean mechanisms, detailing their roles, how they are defined via XML, annotations or interfaces, the use of BeanDefinition.setInstanceSupplier() for flexible instantiation, and provides concrete code examples for each approach.

BeanDefinitionFactoryBeanSpring
0 likes · 6 min read
Spring Bean Creation: BeanDefinition vs FactoryBean Explained
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.

FrontendIoCJavaScript
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.

Dynamic SwitchingSpringbackend
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.

Bean LifecycleSpringbackend development
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.

IoCSpringbackend development
0 likes · 5 min read
Mastering Spring’s IOC Container: Concepts, Types, and Startup Steps
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 LifecycleSpringSpring Boot
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.

Frontenddependency injectionmodularization
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.

SpringSpringBootannotations
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.

SpringStrategy Patternbackend
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.

Circular DependencyConstructor 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.

Inversion of ControlSpringbackend development
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.

PHPService Containerbackend-development
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.

Constructor InjectionField InjectionSetter 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 InjectionField InjectionSetter 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.

FactoryBeanSPISpring Boot
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.

AspectJConfigurablebackend development
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.

AnnotationMyBatisSpring
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.

Gobackend developmentdependency injection
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.

AnnotationMyBatisSpring
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.

GoLifecycle Managementbackend development
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 ConfigurationSpringannotations
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.

GetXState Managementdependency injection
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.

FrontendModular DesignQuality Assurance
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.

FactoryBeanSPIdependency injection
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.

Backend ArchitectureDAOService Layer
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.

ASGIFlaskPydantic
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.

DAOService LayerSpring
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.

Factory BeanService LocatorSpring
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.

Spring Bootannotationsbackend development
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.

GoWeb Developmentarchitecture
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 InjectionField InjectionSetter 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.

Static Fieldsbackend developmentdependency injection
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.

GoGoogle WireStatic Analysis
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.

GoPlugin systemdependency injection
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.

Design PatternsGinGo
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.

PHPTraitsbackend development
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.

BeanFactoryIoCSpring
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 ScopeObjectFactoryCreatingFactoryBeanServiceLocatorFactoryBean
0 likes · 9 min read
Spring Prototype Bean Injection: ServiceLocator vs ObjectFactoryCreating
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.

GoMiddlewareModular Design
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.

AutowiredSpringSpring Boot
0 likes · 15 min read
Mastering Spring’s @Autowired: Advanced Usage, Qualifiers, and Common Pitfalls
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.

LombokSpringannotations
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.

DAOService LayerSpring
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.

ComponentConfigurationSpring
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.

Service LayerSpringarchitecture
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.

Design PatternsIoCdependency injection
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.

Java SPIPlugin architectureSpring Boot
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.

AutowiredResourceSpring
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.

PHPWebmanbackend development
0 likes · 9 min read
Mastering PHP-DI: A Step‑by‑Step Guide to Dependency Injection in Webman