Tagged articles

dependency injection

526 articles · Page 3 of 6
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.

AOPSpring Bootcaching
0 likes · 10 min read
Master Spring Boot 2.7: Bean Lifecycle, DI, AOP, Caching & More
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.

Spring BootStrategy Patternbackend
0 likes · 8 min read
Applying the Strategy Pattern with Simple Factory in a Spring Boot Application
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.

Bean LifecycleSpring Bootbackend development
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.

GoMockingSoftware Engineering
0 likes · 17 min read
How to Write Testable Business Code in Go: A Practical Guide
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jan 24, 2024 · Mobile Development

Unlock Peak Kotlin Performance with Advanced Refactoring Techniques

This article guides developers through a series of Kotlin refactoring steps—replacing when statements with HashMap, introducing payload mechanisms, infix functions, inline registration, and delegated properties—to dramatically improve event‑handling performance, readability, and maintainability while adhering to the single‑responsibility principle.

HashMapInfix FunctionsKotlin
0 likes · 16 min read
Unlock Peak Kotlin Performance with Advanced Refactoring Techniques
Baidu Geek Talk
Baidu Geek Talk
Jan 8, 2024 · Backend Development

Exgraph: A Graph Execution Engine for Task Orchestration

Exgraph, Baidu Search’s graph execution engine, uses a human‑readable description language and a robust execution core with dependency injection, object pooling, and interruption handling to orchestrate complex, parallel or conditional tasks, improving code readability and unifying diverse execution scenarios in search architecture.

DAGGo developmentSearch Architecture
0 likes · 10 min read
Exgraph: A Graph Execution Engine for Task Orchestration
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jan 5, 2024 · Backend Development

Mastering Spring Bean Scopes: When to Use Singleton, Prototype, Request, Session, and More

This article explains Spring's bean scopes—including singleton, prototype, request, session, and application—detailing their lifecycles, appropriate use cases, and how to configure them with code examples, while also covering common pitfalls and proxy solutions for web environments.

Bean ScopeSpringdependency injection
0 likes · 10 min read
Mastering Spring Bean Scopes: When to Use Singleton, Prototype, Request, Session, and More
IT Niuke
IT Niuke
Jan 2, 2024 · Fundamentals

How to Use the Chain of Responsibility Pattern for Real‑World Data Filtering

This article explains the Chain of Responsibility design pattern, defines its three core roles, compares external and internal composition, demonstrates a lead‑filtering use case with Java and Spring code, and discusses benefits, drawbacks, and differences from the Strategy pattern.

Chain of ResponsibilityDesign PatternsSpring
0 likes · 9 min read
How to Use the Chain of Responsibility Pattern for Real‑World Data Filtering
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 27, 2023 · Backend Development

How @Nullable Prevents Spring Bean Injection Failures

Learn how to use Spring's @Nullable annotation (or its Java equivalents) to safely handle missing beans during dependency injection, avoiding startup errors, with code examples, underlying mechanism details, and comparisons to other approaches like required=false, Optional, and ObjectFactory.

@NullableSpringbackend development
0 likes · 6 min read
How @Nullable Prevents Spring Bean Injection Failures
政采云技术
政采云技术
Dec 5, 2023 · Fundamentals

Java SPI vs Dubbo SPI: Service Provider Interface Mechanisms Compared

This article explains Java's Service Provider Interface (SPI) mechanism and compares it with Dubbo's enhanced SPI implementation, highlighting how Dubbo addresses the limitations of native Java SPI through configuration format changes and lazy loading.

Dubbo SPIFramework ExtensionJava SPI
0 likes · 19 min read
Java SPI vs Dubbo SPI: Service Provider Interface Mechanisms Compared
Architect's Tech Stack
Architect's Tech Stack
Dec 2, 2023 · Backend Development

Drawbacks of the Spring Framework: Performance, Configuration Complexity, Learning Curve, and More

This article examines several drawbacks of the Spring framework—including performance overhead from reflection and proxies, complex configuration, steep learning curve, over‑reliance on the Spring ecosystem, hidden “magic” features, version compatibility challenges, and misuse of dependency injection—illustrated with Java code examples.

ConfigurationSpringdependency injection
0 likes · 8 min read
Drawbacks of the Spring Framework: Performance, Configuration Complexity, Learning Curve, and More
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 2, 2023 · Backend Development

Mastering Spring’s @Import: Three Powerful Ways to Load Configurations

This guide explains Spring’s @Import annotation, covering three import strategies—direct class array, ImportSelector, and ImportBeanDefinitionRegistrar—through detailed code examples, usage scenarios, and important version notes, helping developers improve configuration management, code maintainability, and readability in backend Java applications.

ConfigurationImport AnnotationSpring
0 likes · 6 min read
Mastering Spring’s @Import: Three Powerful Ways to Load Configurations
Sohu Tech Products
Sohu Tech Products
Nov 22, 2023 · Fundamentals

Mastering the Chain of Responsibility: From SOLID Principles to Spring Integration

This article explains the seven SOLID design principles, introduces the Chain of Responsibility pattern, demonstrates its application to a video‑review workflow with step‑by‑step Java code, and shows how to evolve the implementation from a basic chain to a Spring‑managed, fully open‑closed solution.

Chain of ResponsibilityDesign PatternsSOLID
0 likes · 13 min read
Mastering the Chain of Responsibility: From SOLID Principles to Spring Integration
php Courses
php Courses
Nov 17, 2023 · Fundamentals

Using the Strategy Pattern in PHP to Send Notifications

An overview of the Strategy design pattern demonstrates how to encapsulate notification-sending algorithms in independent PHP classes, allowing runtime selection among email, SMS, or FCM implementations without modifying client code, and highlights benefits such as flexibility, reusability, and testability.

Design PatternsNotificationPHP
0 likes · 5 min read
Using the Strategy Pattern in PHP to Send Notifications
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 7, 2023 · Mobile Development

Comprehensive Guide to Building Modern Android Apps in 2023

This article provides a detailed overview of the latest 2023 trends, tools, libraries, architectural patterns, and best practices for developing modern Android applications, covering everything from Kotlin and Jetpack Compose to Clean Architecture, modularization, performance optimization, and Google Play features.

AndroidClean ArchitectureJetpack Compose
0 likes · 16 min read
Comprehensive Guide to Building Modern Android Apps in 2023
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 3, 2023 · Mobile Development

Comprehensive Guide to Using Hilt for Dependency Injection in Android

This article explains the fundamentals of dependency injection, introduces Hilt and its basic setup for Android, demonstrates advanced features such as qualifiers, scopes, assisted injection, custom entry points, and analyzes Hilt's underlying principles, helping developers decide whether to adopt DI frameworks in Android projects.

AndroidAssisted InjectionDI Framework
0 likes · 21 min read
Comprehensive Guide to Using Hilt for Dependency Injection in Android
php Courses
php Courses
Oct 23, 2023 · Backend Development

Implementing a Service Layer in PHP: Benefits, Steps, and Example Code

This article explains the purpose and advantages of a service layer between presentation and domain layers, outlines step‑by‑step how to create one in PHP—including directory setup, class and interface definitions, dependency injection—and provides sample code for user management services and controller integration.

PHPService Layerbackend development
0 likes · 4 min read
Implementing a Service Layer in PHP: Benefits, Steps, and Example Code
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 21, 2023 · Backend Development

Mastering Spring’s ObjectProvider: Flexible Dependency Injection Techniques

Spring’s ObjectProvider interface enhances dependency injection by allowing optional, lazy, and multiple bean retrieval, offering methods like getIfAvailable, orderedStream, and stream, with code examples demonstrating on-demand injection, fetching all implementations, and the underlying mechanism via DependencyObjectProvider in the DefaultListableBeanFactory.

Springdependency injectionjava
0 likes · 8 min read
Mastering Spring’s ObjectProvider: Flexible Dependency Injection Techniques
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 16, 2023 · Backend Development

Master Spring Bean Injection: Prototype in Singleton, Lazy, Transactions & More

This guide explains how to handle various Spring bean injection and transaction challenges, including injecting prototype beans into singletons, using @Lazy, registering abstract beans, resolving multiple bean conflicts, forcing rollback without exceptions, injecting static fields, ensuring transaction consistency, enabling non‑public transactional methods, custom component scanning, and adding interfaces via AOP.

Bean ScopeSpringTransaction Management
0 likes · 12 min read
Master Spring Bean Injection: Prototype in Singleton, Lazy, Transactions & More
Architecture Digest
Architecture Digest
Oct 12, 2023 · Backend Development

Why You Should Stop Using Field Injection in Spring Boot

The article explains the drawbacks of field injection in Spring Boot—such as poor testability, loss of immutability, tighter framework coupling, risk of NullPointerExceptions, and hidden circular dependencies—and demonstrates how constructor injection provides a cleaner, more maintainable alternative with clear code examples.

Constructor InjectionField InjectionSpring Boot
0 likes · 7 min read
Why You Should Stop Using Field Injection in Spring Boot
Shepherd Advanced Notes
Shepherd Advanced Notes
Oct 10, 2023 · Backend Development

Master 16 SpringBoot Extension Interfaces for Cleaner, More Elegant Code

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

Bean LifecycleSpringbackend
0 likes · 19 min read
Master 16 SpringBoot Extension Interfaces for Cleaner, More Elegant Code
Top Architect
Top Architect
Oct 7, 2023 · Backend Development

Why Field Injection Should Be Avoided in Spring Boot: Benefits of Constructor Injection

This article explains why field injection in Spring Boot should be avoided, highlighting its drawbacks such as poor testability, mutability, tight coupling, risk of null‑pointer exceptions, and circular dependencies, and demonstrates how constructor injection offers a cleaner, more maintainable alternative with code examples.

Constructor InjectionField InjectionSpring Boot
0 likes · 9 min read
Why Field Injection Should Be Avoided in Spring Boot: Benefits of Constructor Injection
Architect
Architect
Sep 26, 2023 · Backend Development

Comprehensive Guide to Spring MVC Annotations and Related Spring Annotations

This article provides a detailed overview of Spring MVC and Spring Boot annotations such as @RequestMapping, @GetMapping, @PostMapping, @RequestBody, @ControllerAdvice, @Component, @Bean, @Scope, @Autowired, and others, explaining their purposes, attributes, usage patterns, and offering practical code examples for each.

SpringSpring Bootannotations
0 likes · 15 min read
Comprehensive Guide to Spring MVC Annotations and Related Spring Annotations
macrozheng
macrozheng
Sep 19, 2023 · Backend Development

Why Spring’s Field Injection Triggers a Warning and Which DI Method Wins

Spring’s @Autowired field injection often shows an IDE warning, prompting developers to compare field, constructor, and setter injection; this article explains each method’s implementation, evaluates reliability, maintainability, testability, flexibility, circular‑dependency detection, and performance, and recommends constructor injection as the preferred approach.

AutowiredConstructor InjectionSetter Injection
0 likes · 7 min read
Why Spring’s Field Injection Triggers a Warning and Which DI Method Wins
Java Architect Essentials
Java Architect Essentials
Sep 18, 2023 · Backend Development

When Should You Use @Autowired vs @Resource? A Deep Dive into Spring Dependency Injection

Spring developers often wonder whether to use @Autowired or @Resource for dependency injection; this article explains their origins, supported injection styles, configurable attributes, bean lookup strategies, and why constructor injection is generally preferred despite IDE warnings about field injection.

AutowiredIDE WarningResource
0 likes · 6 min read
When Should You Use @Autowired vs @Resource? A Deep Dive into Spring Dependency Injection
Java Backend Technology
Java Backend Technology
Sep 18, 2023 · Backend Development

Why IDEA Warns About @Autowired but Ignores @Resource – Understanding Spring DI

This article examines why IntelliJ IDEA flags field injection with @Autowired but not with @Resource, compares Spring’s @Autowired and JSR‑250’s @Resource, outlines the various DI approaches—constructor, setter, and field injection—and discusses their advantages, drawbacks, and best‑practice usage scenarios.

AutowiredIDEAResource
0 likes · 6 min read
Why IDEA Warns About @Autowired but Ignores @Resource – Understanding Spring DI
Selected Java Interview Questions
Selected Java Interview Questions
Aug 15, 2023 · Backend Development

Understanding Conditional Configuration and Profiles in Spring Framework

This article explains Spring's conditional configuration features—including @Profile, @Conditional, and various @ConditionalOn* annotations—showing how to dynamically register beans based on environment, classpath, properties, or other bean presence, with detailed code examples and usage guidelines.

Conditional ConfigurationProfilesSpring
0 likes · 25 min read
Understanding Conditional Configuration and Profiles in Spring Framework
AI Skills Research
AI Skills Research
Aug 12, 2023 · Backend Development

Implementing CQRS with MediatR – Part 1

This article explains the CQRS and Mediator patterns, compares CQRS to CRUD, discusses trade‑offs, and provides a step‑by‑step guide to configuring MediatR in an ASP.NET Core Web API, creating commands, queries, handlers, and testing the setup with Postman.

ASP.NET CoreCommandMediatR
0 likes · 12 min read
Implementing CQRS with MediatR – Part 1
Huolala Tech
Huolala Tech
Aug 8, 2023 · Mobile Development

TheRouter-iOS: A Lightweight Routing Middleware for Mobile Apps

TheRouter-iOS is a lightweight, annotation‑driven routing middleware that brings Java‑style dependency injection, hard‑code elimination, dynamic redirection, interceptors, and flexible navigation to iOS, offering a unified solution for complex mobile architectures and seamless integration with Android and web components.

AnnotationMiddlewaredependency injection
0 likes · 13 min read
TheRouter-iOS: A Lightweight Routing Middleware for Mobile Apps
ByteFE
ByteFE
Aug 2, 2023 · Fundamentals

Understanding Dependency Injection and Inversion of Control with TypeScript

This article explains the concepts of Inversion of Control and Dependency Injection, demonstrates how to implement a lightweight DI container in TypeScript using decorators and reflection, and covers advanced features such as provider registration, abstraction, lazy loading, and handling circular dependencies.

Design PatternsIOC ContainerInversion of Control
0 likes · 35 min read
Understanding Dependency Injection and Inversion of Control with TypeScript
Selected Java Interview Questions
Selected Java Interview Questions
Jul 21, 2023 · Backend Development

Using Lombok @RequiredArgsConstructor to Replace @Autowired and @Resource for Spring Dependency Injection

This article explains how Lombok's @RequiredArgsConstructor can replace multiple @Autowired and @Resource annotations by promoting constructor injection, compares field, constructor, and setter injection in Spring, and demonstrates the resulting cleaner code with practical examples.

Constructor InjectionLombokSpring
0 likes · 6 min read
Using Lombok @RequiredArgsConstructor to Replace @Autowired and @Resource for Spring Dependency Injection
Code Ape Tech Column
Code Ape Tech Column
Jun 30, 2023 · Backend Development

Applying the Service Locator Pattern to Decouple File Parsers in Spring

This article demonstrates how to replace tightly‑coupled if‑else or switch‑case parser selection with the Service Locator Pattern in a Spring Java application, enabling easy addition of new file‑type parsers without modifying client code and adhering to the open‑closed principle.

DecouplingDesign PatternParser
0 likes · 8 min read
Applying the Service Locator Pattern to Decouple File Parsers in Spring
Programmer DD
Programmer DD
Jun 27, 2023 · Backend Development

When to Choose @Autowired vs @Resource in Spring? A Deep Dive

This article compares Spring's @Autowired and JDK's @Resource annotations, detailing their injection mechanisms, parameter differences, default behaviors, and usage scopes with code examples, while also offering interview advice and promoting a Java interview guide.

AutowiredResourceSpring
0 likes · 21 min read
When to Choose @Autowired vs @Resource in Spring? A Deep Dive
Java Architect Essentials
Java Architect Essentials
Jun 15, 2023 · Backend Development

Mastering Java Plugin Architecture: From SPI to Spring Factories

This article explains why and how to use plugin mechanisms in Java, covering the benefits of modular decoupling, common implementation patterns such as ServiceLoader, custom configuration loading, and Spring Boot's spring.factories, and provides step‑by‑step code examples and practical case studies.

SPISpring Bootarchitecture
0 likes · 22 min read
Mastering Java Plugin Architecture: From SPI to Spring Factories
Selected Java Interview Questions
Selected Java Interview Questions
Jun 15, 2023 · Backend Development

How Spring IOC Reduces Coupling: From Direct Instantiation to Interfaces, Factory Method, and Reflection

This article explains the concept of coupling, demonstrates how traditional object creation leads to high coupling, and shows how using interfaces, the factory pattern, and reflection—culminating in Spring IOC—can dramatically lower coupling, improve reuse, and simplify maintenance in Java backend development.

CouplingFactory PatternIoC
0 likes · 8 min read
How Spring IOC Reduces Coupling: From Direct Instantiation to Interfaces, Factory Method, and Reflection
Programmer DD
Programmer DD
Jun 14, 2023 · Backend Development

Mastering Spring Property Injection: From XML to SpEL

This article provides a comprehensive guide to Spring's property injection techniques, covering setter and constructor injection using both XML and Java annotations, external configuration with @PropertySource, and advanced SpEL expressions, complete with runnable code examples and output screenshots.

SpELSpringXML
0 likes · 27 min read
Mastering Spring Property Injection: From XML to SpEL
Shepherd Advanced Notes
Shepherd Advanced Notes
Jun 12, 2023 · Backend Development

How Spring Solves Circular Bean Dependencies with a Three‑Level Cache

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

Bean LifecycleCircular DependencySpring
0 likes · 17 min read
How Spring Solves Circular Bean Dependencies with a Three‑Level Cache
Architecture Digest
Architecture Digest
Jun 7, 2023 · Backend Development

Why IntelliJ IDEA Warns on @Autowired Field Injection but Not on @Resource

The article explains the differences between Spring's @Autowired and @Resource annotations, outlines the pros and cons of various dependency injection methods, and clarifies why IntelliJ IDEA issues a warning for field injection with @Autowired while treating @Resource as acceptable, emphasizing portability and coupling concerns.

AutowiredIDEAResource
0 likes · 5 min read
Why IntelliJ IDEA Warns on @Autowired Field Injection but Not on @Resource
Programmer DD
Programmer DD
May 23, 2023 · Backend Development

How to Detect and Resolve Circular Dependencies in Spring Boot

This article explains what circular dependencies are in Spring Boot, describes the symptoms and errors introduced in recent versions, and provides multiple practical solutions—including constructor injection, @Lazy, @DependsOn, and interface segregation—along with clear code examples for each approach.

@LazyCircular DependencySpring Boot
0 likes · 8 min read
How to Detect and Resolve Circular Dependencies in Spring Boot
Alipay Experience Technology
Alipay Experience Technology
May 19, 2023 · Frontend Development

What Makes VSCode’s Architecture So Powerful? Inside Dependency Injection, Registry, and LSP

This article explores VSCode’s sophisticated architecture, detailing how its dependency injection system, event lifecycle management, registry‑based extension points, cross‑platform service injection, and Language Server Protocol enable a modular, high‑performance editor that can be extended safely across web, desktop, and mobile environments.

Event SystemFrontend ArchitectureLSP
0 likes · 52 min read
What Makes VSCode’s Architecture So Powerful? Inside Dependency Injection, Registry, and LSP
Top Architect
Top Architect
May 10, 2023 · Backend Development

Implementing a Custom @Autowired-like Annotation in Spring

This article demonstrates how to create a simple custom annotation that mimics Spring's @Autowired functionality by defining a new annotation, a BeanPostProcessor, configuring beans in XML, and wiring everything together in a test class to show the injection working at runtime.

BeanPostProcessorCustom AnnotationSpring
0 likes · 8 min read
Implementing a Custom @Autowired-like Annotation in Spring
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 5, 2023 · Fundamentals

Inversion of Control and SOLID Principles in the JavaScript Ecosystem with InversifyJS and Theia

This article revisits Inversion of Control and SOLID design principles within the JavaScript ecosystem, explains their practical application using InversifyJS, demonstrates a full‑stack example in the Theia IDE framework, and discusses the benefits, challenges, and best‑practice considerations of adopting IOC in modern web projects.

InversifyJSInversion of ControlTypeScript
0 likes · 23 min read
Inversion of Control and SOLID Principles in the JavaScript Ecosystem with InversifyJS and Theia
Top Architect
Top Architect
May 5, 2023 · Backend Development

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

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

BeanSpringbackend development
0 likes · 12 min read
How to Register Beans in the Spring Container: Five Common Methods
Su San Talks Tech
Su San Talks Tech
Apr 25, 2023 · Backend Development

Unlocking Spring’s Design Patterns: From Proxy to Adapter Explained

This article explores how Spring implements classic design patterns—Proxy, Strategy, Decorator, Singleton, Simple Factory, Factory Method, Observer, Template, and Adapter—detailing their purpose, core code snippets, and the way Spring leverages them to provide flexible, extensible, and maintainable backend functionality.

AOPDesign PatternsSpring
0 likes · 13 min read
Unlocking Spring’s Design Patterns: From Proxy to Adapter Explained
Top Architect
Top Architect
Apr 24, 2023 · Backend Development

Understanding the Spring Bean Lifecycle and Its Core Stages

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

Bean LifecycleSpringbackend
0 likes · 16 min read
Understanding the Spring Bean Lifecycle and Its Core Stages
Shepherd Advanced Notes
Shepherd Advanced Notes
Apr 19, 2023 · Backend Development

Spring Extension Point (Part 1): Understanding PostProcessor Mechanisms

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

Bean LifecycleSpringconfigurationclasspostprocessor
0 likes · 14 min read
Spring Extension Point (Part 1): Understanding PostProcessor Mechanisms
Selected Java Interview Questions
Selected Java Interview Questions
Apr 18, 2023 · Backend Development

Understanding the Spring Bean Lifecycle: Creation, Initialization, Usage, and Destruction

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

AOPBean LifecycleSpring
0 likes · 15 min read
Understanding the Spring Bean Lifecycle: Creation, Initialization, Usage, and Destruction
Programmer DD
Programmer DD
Apr 18, 2023 · Backend Development

5 Essential Ways to Register Beans in Spring’s IoC Container

This article explains five core techniques for adding beans to the Spring IoC container—including @Configuration with @Bean, @ComponentScan, various @Import strategies, FactoryBean, and BeanDefinitionRegistryPostProcessor—providing code examples and key considerations for each method.

Bean Registrationbackend developmentdependency injection
0 likes · 10 min read
5 Essential Ways to Register Beans in Spring’s IoC Container
Selected Java Interview Questions
Selected Java Interview Questions
Apr 13, 2023 · Backend Development

Analysis of Spring Bean Instantiation Strategies in AbstractAutowireCapableBeanFactory

This article dissects the core bean creation logic of Spring's AbstractAutowireCapableBeanFactory, detailing how createBeanInstance delegates to obtainFromSupplier, instantiateUsingFactoryMethod, autowireConstructor, and fallback default constructors, while explaining the role of Supplier, ConstructorResolver, argument resolution, and caching mechanisms.

BeanFactoryConstructor InjectionFactory Method
0 likes · 34 min read
Analysis of Spring Bean Instantiation Strategies in AbstractAutowireCapableBeanFactory
Shepherd Advanced Notes
Shepherd Advanced Notes
Apr 10, 2023 · Backend Development

Understanding Spring @Conditional and Its Derived Annotations

This article explains how Spring Boot’s @Conditional annotation works, shows how to implement custom Condition classes for language switching, and reviews the suite of derived annotations such as @ConditionalOnBean, @ConditionalOnMissingBean, @ConditionalOnClass, @ConditionalOnMissingClass, and @ConditionalOnProperty with concrete code examples.

@ConditionalConditionalOnBeanConditionalOnProperty
0 likes · 9 min read
Understanding Spring @Conditional and Its Derived Annotations
Selected Java Interview Questions
Selected Java Interview Questions
Apr 9, 2023 · Backend Development

Using Lombok @RequiredArgsConstructor to Replace @Autowired and @Resource in Spring Dependency Injection

The article explains Spring's three dependency injection methods, highlights the drawbacks of field injection, recommends constructor injection, and demonstrates how Lombok's @RequiredArgsConstructor can generate the required constructor to eliminate @Autowired and @Resource annotations, simplifying code and preventing NullPointerExceptions.

Constructor InjectionLombokSpring
0 likes · 4 min read
Using Lombok @RequiredArgsConstructor to Replace @Autowired and @Resource in Spring Dependency Injection
Code Ape Tech Column
Code Ape Tech Column
Apr 8, 2023 · Backend Development

Understanding Spring Dependency Injection and Lombok @RequiredArgsConstructor

This article explains Spring's three dependency injection methods—field, constructor, and setter injection—highlights the advantages of constructor injection for avoiding null pointers and circular dependencies, and demonstrates how Lombok's @RequiredArgsConstructor can simplify bean wiring in Java backend development.

Constructor InjectionLombokSpring
0 likes · 6 min read
Understanding Spring Dependency Injection and Lombok @RequiredArgsConstructor
Shepherd Advanced Notes
Shepherd Advanced Notes
Apr 3, 2023 · Backend Development

Deep Dive into Spring’s @ComponentScan: Usage and Underlying Mechanics

This article explains why Spring Boot is popular, how @ComponentScan discovers @Component, @Controller, @Service, and @Repository beans across packages, demonstrates usage with code examples, and details the internal processing flow involving ConfigurationClassPostProcessor and related parsers.

AnnotationConfigurationSpring
0 likes · 15 min read
Deep Dive into Spring’s @ComponentScan: Usage and Underlying Mechanics
macrozheng
macrozheng
Mar 24, 2023 · Backend Development

Unlock the Full Power of Spring’s @Autowired: Advanced Techniques and Common Pitfalls

This article explores Spring’s @Autowired annotation in depth, covering default wiring, handling multiple beans, using @Qualifier and @Primary, various injection targets, advanced collection injection, common pitfalls, and differences from @Resource, providing practical code examples and solutions for real‑world projects.

AutowiredSpringdependency injection
0 likes · 15 min read
Unlock the Full Power of Spring’s @Autowired: Advanced Techniques and Common Pitfalls
Sohu Tech Products
Sohu Tech Products
Mar 22, 2023 · Backend Development

Understanding @Autowired Injection Issues and Alternative Approaches in Spring

The article explains common problems with Spring's @Autowired injection, compares it with @Resource, and presents alternative injection methods—including setter, constructor, and Lombok-based approaches—while providing code examples and best‑practice recommendations for reliable bean initialization.

AutowiredConstructor InjectionLombok
0 likes · 5 min read
Understanding @Autowired Injection Issues and Alternative Approaches in Spring
Top Architect
Top Architect
Mar 21, 2023 · Backend Development

Understanding @Autowired vs @Resource and Injection Methods in Spring

The article explains common pitfalls of using Spring's @Autowired, compares it with the standard @Resource annotation, and demonstrates various injection techniques—including field, setter, constructor, and Lombok-based constructor injection—through detailed code examples and best‑practice recommendations.

AutowiredLombokResource
0 likes · 6 min read
Understanding @Autowired vs @Resource and Injection Methods in Spring
DevOps
DevOps
Mar 21, 2023 · Backend Development

Effective Unit Testing Strategies for Large Legacy Systems

The article shares practical techniques for improving unit test coverage in massive, low‑quality legacy codebases, including creating isolated new modules, applying test‑driven development, decoupling through design patterns, extracting interfaces, using seams, and employing mocking to overcome static dependencies.

Mockingdependency injectionlegacy code
0 likes · 9 min read
Effective Unit Testing Strategies for Large Legacy Systems
macrozheng
macrozheng
Mar 15, 2023 · Backend Development

Master Java SPI: From Service Provider Interface to Spring Boot Auto‑Configuration

This article explains Java’s Service Provider Interface (SPI) mechanism, compares it with traditional APIs, demonstrates how to define interfaces, implement services, and discover them using ServiceLoader, and shows real‑world applications such as Spring Boot auto‑configuration and logging frameworks like SLF4J.

SPIServiceLoaderSpring Boot
0 likes · 13 min read
Master Java SPI: From Service Provider Interface to Spring Boot Auto‑Configuration
ByteFE
ByteFE
Mar 8, 2023 · Fundamentals

Inversion of Control and Dependency Injection in JavaScript: InversifyJS and Theia Case Study

This article revisits the concepts of Inversion of Control and SOLID design principles within the JavaScript ecosystem, explains how InversifyJS implements IoC with TypeScript decorators, demonstrates practical steps to configure containers and bindings, and shows how Theia leverages these techniques for modular front‑end and back‑end architecture, while also discussing the benefits and limitations of IoC in modern web development.

InversifyJSInversion of ControlTypeScript
0 likes · 26 min read
Inversion of Control and Dependency Injection in JavaScript: InversifyJS and Theia Case Study
Sanyou's Java Diary
Sanyou's Java Diary
Feb 23, 2023 · Backend Development

Unlocking Java’s SPI: How Service Provider Interface Powers Spring Boot Auto‑Configuration

This article explains Java's Service Provider Interface (SPI) mechanism, demonstrates how to define, implement, and discover services with code examples—including a smart‑home air‑conditioner scenario—and shows its practical use in Spring Boot auto‑configuration and logging frameworks like SLF4J.

SPIServiceLoaderSpring Boot
0 likes · 14 min read
Unlocking Java’s SPI: How Service Provider Interface Powers Spring Boot Auto‑Configuration
Top Architect
Top Architect
Feb 16, 2023 · Backend Development

Understanding Dependency Injection and IoC in Spring: From Direct Instantiation to Factory Pattern and Reflection

This article explains why dependency injection reduces coupling compared with direct object creation, walks through traditional instantiation, interface programming, factory methods, and reflection, and shows how Spring IoC combines these techniques to manage object lifecycles and improve code maintainability.

Factory PatternIoCdependency injection
0 likes · 8 min read
Understanding Dependency Injection and IoC in Spring: From Direct Instantiation to Factory Pattern and Reflection
Java Captain
Java Captain
Feb 7, 2023 · Backend Development

A Sarcastic Critique of Overengineered Enterprise Java Architecture

The article humorously deconstructs an overly complex Java enterprise setup, illustrating how excessive use of interfaces, abstract classes, factories, dependency injection, XML configuration, and heavyweight IDE tooling leads to bloated, hard‑to‑maintain code that ultimately fails in production.

Design PatternsEnterprise ArchitectureFactory Pattern
0 likes · 5 min read
A Sarcastic Critique of Overengineered Enterprise Java Architecture
Code Ape Tech Column
Code Ape Tech Column
Jan 31, 2023 · Backend Development

Applying the Service Locator Pattern to Decouple File Parsers in Java

This article explains how to replace tightly‑coupled if‑else or switch‑case logic for selecting file parsers (JSON, CSV, XML) with a Service Locator Pattern using Spring's ServiceLocatorFactoryBean, demonstrating a clean, extensible solution that follows the Open/Closed principle.

Design PatternService LocatorSpring
0 likes · 8 min read
Applying the Service Locator Pattern to Decouple File Parsers in Java
Sanyou's Java Diary
Sanyou's Java Diary
Jan 30, 2023 · Backend Development

Mastering Spring Bean Injection: 5 Ways to Register Beans in the Container

This article comprehensively reviews the various techniques for injecting beans into the Spring container—including XML and properties configuration files, annotation-based declarations, manual BeanDefinition registration, direct singleton registration, and FactoryBean usage—providing code examples, underlying principles, and practical guidance for each method.

Springbackend developmentbean-injection
0 likes · 18 min read
Mastering Spring Bean Injection: 5 Ways to Register Beans in the Container
Top Architect
Top Architect
Dec 29, 2022 · Backend Development

Understanding Spring Bean Lifecycle and Circular Dependency Resolution

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

AOPBean Lifecycledependency injection
0 likes · 8 min read
Understanding Spring Bean Lifecycle and Circular Dependency Resolution
Architect's Guide
Architect's Guide
Dec 26, 2022 · Fundamentals

Software Architecture Principles: A Guide for Architects

This article presents a comprehensive overview of essential software architecture principles—including Dependency Inversion, Separation of Concerns, Inversion of Control, Dependency Injection, SOLID rules, and more—explaining their purpose, practical impact, and providing Java code examples to illustrate their application in real projects.

Design PrinciplesObject-OrientedSOLID
0 likes · 11 min read
Software Architecture Principles: A Guide for Architects
21CTO
21CTO
Dec 6, 2022 · Fundamentals

Master the 23 Core Software Architecture Principles Every Engineer Should Know

This article presents a concise overview of 23 essential software architecture principles—from Dependency Inversion and Separation of Concerns to Bounded Context and KISS—explaining each concept, its practical impact, and providing code examples to help developers design clean, maintainable systems.

Design PrinciplesSOLIDclean code
0 likes · 12 min read
Master the 23 Core Software Architecture Principles Every Engineer Should Know
IT Architects Alliance
IT Architects Alliance
Dec 5, 2022 · Fundamentals

Essential Software Architecture Principles with Example Implementations

This article outlines core software architecture principles such as Dependency Inversion, Separation of Concerns, Inversion of Control, Dependency Injection, Single Responsibility, DRY, Open‑Closed, Persistence Ignorance, and many others, and illustrates them with Java code examples for actions and converters.

Design PrinciplesSOLIDdependency injection
0 likes · 11 min read
Essential Software Architecture Principles with Example Implementations
Selected Java Interview Questions
Selected Java Interview Questions
Nov 27, 2022 · Backend Development

Strategy Pattern in Java: Theory, Advantages, Drawbacks, and Practical Payment Service Implementation

This article explains the Strategy design pattern, its structure, advantages and drawbacks, and demonstrates a practical Java implementation for payment processing using Spring beans, including interface definitions, concrete payment strategies, and a controller that selects the appropriate strategy at runtime.

Design PatternsSpringStrategy Pattern
0 likes · 6 min read
Strategy Pattern in Java: Theory, Advantages, Drawbacks, and Practical Payment Service Implementation
vivo Internet Technology
vivo Internet Technology
Nov 2, 2022 · Backend Development

Understanding Java SPI: Principles, Implementation, and Applications

Java SPI is a lightweight plug‑in mechanism that decouples service contracts from implementations using a META‑INF/services configuration file and the ServiceLoader class, enabling dynamic loading of providers as demonstrated with simple examples and applied in frameworks such as JDBC, Spring Boot, Apache Commons Logging, and Dubbo.

DubboFrameworksJDBC
0 likes · 33 min read
Understanding Java SPI: Principles, Implementation, and Applications
Top Architect
Top Architect
Oct 24, 2022 · Backend Development

Comprehensive Overview of Spring and Spring Boot Extension Points and Bean Lifecycle

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

Bean LifecycleSpringSpring Boot
0 likes · 17 min read
Comprehensive Overview of Spring and Spring Boot Extension Points and Bean Lifecycle
Java High-Performance Architecture
Java High-Performance Architecture
Oct 15, 2022 · Backend Development

How to Handwrite Spring AOP: From Concepts to Code Implementation

This article walks through the design and implementation of a hand‑written Spring AOP module, covering core concepts such as Advice, Pointcut, weaving, proxy creation, and the integration of these components into a bean lifecycle to enable method‑level enhancements without modifying source code.

AOPaspect-oriented-programmingbackend development
0 likes · 17 min read
How to Handwrite Spring AOP: From Concepts to Code Implementation
Top Architect
Top Architect
Oct 14, 2022 · Backend Development

Spring Annotation Development and MyBatis Integration Guide

This article provides a comprehensive tutorial on using Spring annotations for pure annotation‑based development, defining beans, managing bean scopes, performing various injection techniques, reading configuration properties, and integrating Spring with MyBatis, complete with code examples and best‑practice tips.

MyBatisSpringannotations
0 likes · 10 min read
Spring Annotation Development and MyBatis Integration Guide
Selected Java Interview Questions
Selected Java Interview Questions
Oct 9, 2022 · Backend Development

Various Ways to Register Beans in the Spring IoC Container

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

BeanConfigurationSpring
0 likes · 9 min read
Various Ways to Register Beans in the Spring IoC Container