Tagged articles
492 articles
Page 4 of 5
macrozheng
macrozheng
Mar 10, 2022 · Backend Development

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

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

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

Deep Dive into Spring Bean Lifecycle and Initialization Process

This article provides a comprehensive analysis of Spring's bean lifecycle, detailing the refresh method steps, post‑processor ordering, bean creation, dependency injection via @Autowired and @Resource, Aware callbacks, and initialization hooks such as @PostConstruct and init‑method.

JavaSpring Frameworkbean-lifecycle
0 likes · 24 min read
Deep Dive into Spring Bean Lifecycle and Initialization Process
Java Tech Enthusiast
Java Tech Enthusiast
Mar 9, 2022 · Backend Development

Annotation‑Based Bean Management and Dependency Injection in Spring

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

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

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

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

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

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

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

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

Why Field Injection Is Discouraged in Spring and Preferred Alternatives

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

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

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

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

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

Understanding Dependency Injection in NestJS

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

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

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

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

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

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

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

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

Why Constructor Injection Outperforms Field and Setter Injection in Spring

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

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

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

This article walks through the complete lifecycle of Spring Cloud Feign in a Spring Boot 2.2.13 application, covering how to enable Feign, scan and register @FeignClient beans, inject them into controllers, create dynamic proxy instances, and finally execute remote calls with load‑balancing and Hystrix support.

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

Spring Framework Interview Questions and Answers Overview

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

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

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

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

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

Three Ways to Access Spring Beans from Static Methods

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

JavaPostConstructSpring Boot
0 likes · 6 min read
Three Ways to Access Spring Beans from Static Methods
Java Architect Essentials
Java Architect Essentials
Nov 3, 2021 · Backend Development

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

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

JavaPostConstructSpring Boot
0 likes · 6 min read
Three Ways to Access Spring Beans in Static Methods Using Spring Boot
Selected Java Interview Questions
Selected Java Interview Questions
Oct 29, 2021 · Backend Development

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

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

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

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

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

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

Unlock Spring BeanPostProcessor & BeanFactoryPostProcessor for Backend Customization

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

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

Deep Dive into SpringBoot Auto‑Configuration and Startup Process

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

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

Master Spring MVC & Bean Annotations: A Complete Guide

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

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

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

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

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

Understanding Spring AOP Proxy Creation and Common Pitfalls

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

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

Overview of Spring Web MVC and Spring Bean Annotations

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

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

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

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

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

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

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

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

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

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

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

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

This article provides a comprehensive overview of the Spring Framework, covering its definition, advantages, core features such as IoC, AOP, MVC, transaction management, the various modules and their purposes, configuration methods (XML, annotations, Java API), bean scopes, lifecycle, autowiring, and key annotations used in modern Java backend development.

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

Why Field Injection Is Discouraged in Spring and Preferred Alternatives

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

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

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

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

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

Injecting Beans with Annotations in Spring

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

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

Implementing Dependency Injection in PHP Using Reflection

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

Backend DevelopmentDesign PatternsPHP
0 likes · 5 min read
Implementing Dependency Injection in PHP Using Reflection
Java Backend Technology
Java Backend Technology
Aug 19, 2021 · Backend Development

Eliminate if‑else with Annotation‑Driven Strategy Pattern in Spring Boot

This article explains how to replace bulky if‑else statements with a clean, annotation‑based Strategy pattern in a Spring Boot application, covering interface definition, custom annotations, dynamic proxy handling, map injection, and the crucial hashCode/equals overrides for reliable handler lookup.

Design PatternsJavaStrategy Pattern
0 likes · 14 min read
Eliminate if‑else with Annotation‑Driven Strategy Pattern in Spring Boot
Programmer DD
Programmer DD
Aug 18, 2021 · Backend Development

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

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

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

Mastering Spring @Autowired: 9 Powerful Injection Techniques

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

AutowiredBackend DevelopmentCode Examples
0 likes · 7 min read
Mastering Spring @Autowired: 9 Powerful Injection Techniques
Top Architect
Top Architect
Jul 31, 2021 · Backend Development

Understanding Spring Bean Instantiation Process

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

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

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

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

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

Design Patterns in the Spring Framework: A Comprehensive Overview

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

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

Mastering Spring @Autowired: 9 Powerful Injection Techniques

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Understanding and Implementing Spring's @Autowired Annotation

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

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

Understanding and Implementing Spring's @Autowired Annotation

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

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

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

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

JavaThree-level CacheTwo Sum
0 likes · 9 min read
How Spring Solves Circular Dependencies: Inside the Three‑Level Cache
Top Architect
Top Architect
Jun 20, 2021 · Backend Development

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

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

Inversion of ControlIoCJava
0 likes · 9 min read
Understanding Spring IoC (Inversion of Control) and Dependency Injection (DI)
Java Tech Enthusiast
Java Tech Enthusiast
Jun 18, 2021 · Backend Development

Spring Annotation-Based Bean Registration Guide

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

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

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

This comprehensive guide explores the Spring framework’s fundamentals, including its lightweight architecture, core IoC container, dependency injection mechanisms, bean scopes and lifecycle, annotation‑based configuration, data‑access support, and aspect‑oriented programming features, providing developers with a solid foundation for building robust Java applications.

FrameworkIoCJava
0 likes · 45 min read
Mastering Spring: Core Concepts, IoC, AOP, and Bean Management Explained
Top Architect
Top Architect
Jun 13, 2021 · Backend Development

Implementing AOP in a Custom Spring‑like Framework

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

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

Guice Dependency Injection: Concepts, Usage, and Best Practices

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

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

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

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

JavaMVCSpring Framework
0 likes · 19 min read
Spring Framework Basics: Core Concepts, Modules, Dependency Injection, Beans, Annotations, AOP, MVC, and Data Access
Java Tech Enthusiast
Java Tech Enthusiast
Jun 3, 2021 · Backend Development

Master Spring IoC: From Bean Creation to Dependency Injection

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

Backend DevelopmentIoCJava
0 likes · 19 min read
Master Spring IoC: From Bean Creation to Dependency Injection
Top Architect
Top Architect
May 31, 2021 · Backend Development

Do Service and DAO Layers Need Interfaces? A Practical Discussion for Java Backend Projects

This article examines whether Service and DAO layers in Java backend projects require interfaces, arguing that with dependency‑injection frameworks like Spring the interfaces are often unnecessary, while outlining development workflows, project structures, and scenarios where interfaces remain useful.

Backend ArchitectureInterface DesignJava
0 likes · 8 min read
Do Service and DAO Layers Need Interfaces? A Practical Discussion for Java Backend Projects
Top Architect
Top Architect
May 28, 2021 · Backend Development

Injecting Specific Service Implementations in Spring with @Autowired, @Qualifier, and @Resource

This article explains three methods to inject a specific service implementation into a Spring controller—using @Autowired with @Qualifier, using @Resource with type, and using named @Service beans combined with @Resource(name), including code examples and differences between @Autowired and @Resource.

Javaannotationsdependency-injection
0 likes · 4 min read
Injecting Specific Service Implementations in Spring with @Autowired, @Qualifier, and @Resource
Programmer DD
Programmer DD
May 19, 2021 · Backend Development

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

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

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

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

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

Software ArchitectureType Safetydependency-injection
0 likes · 11 min read
Functional Dependency Injection in Python: From Simple Thresholds to Contextual Composition
Java Interview Crash Guide
Java Interview Crash Guide
Apr 28, 2021 · Backend Development

Inside Spring: How Beans Are Instantiated Step by Step

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

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

Understanding the Spring Bean Instantiation Process

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

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

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

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

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

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

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

JavaSpring MVCWeb Development
0 likes · 38 min read
Mastering Spring MVC: Core Concepts, Components, and Annotations Explained
IT Architects Alliance
IT Architects Alliance
Apr 3, 2021 · Frontend Development

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

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

BaiduComponentizationFrontend Architecture
0 likes · 14 min read
How Baidu Re‑engineered Its Mobile Search Front‑End Architecture for Scale
ITFLY8 Architecture Home
ITFLY8 Architecture Home
Apr 3, 2021 · Frontend Development

How Baidu Redesigned Its Mobile Search Front‑End Architecture for Scale and Performance

This article examines Baidu's mobile search front‑end architecture, identifies scalability and maintainability challenges such as massive codebases, unclear responsibilities, tight coupling and outdated tech stacks, and explains the three‑layer solution—foundation, modular middle layer, and componentization—along with implementation details, dependency injection, SSR adoption, and performance optimizations.

BaiduComponentizationFrontend Architecture
0 likes · 14 min read
How Baidu Redesigned Its Mobile Search Front‑End Architecture for Scale and Performance
Top Architect
Top Architect
Mar 3, 2021 · Backend Development

How Spring Solves Circular Dependencies and the Underlying Essence

This article explains Spring's approach to resolving circular dependencies in singleton beans using a three‑level cache, contrasts it with prototype bean limitations, provides a simplified implementation example, and draws an analogy to the classic two‑sum algorithm to illustrate the core concept.

BackendDesign PatternsJava
0 likes · 9 min read
How Spring Solves Circular Dependencies and the Underlying Essence
Baidu Geek Talk
Baidu Geek Talk
Mar 1, 2021 · Frontend Development

Frontend Architecture Design: Evolution and Solutions

The article examines the evolution and challenges of frontend architecture through Baidu’s mobile search case, identifies problems such as vague responsibilities, tight coupling, and legacy stacks, and proposes a three‑tier solution—infra, independent modules, and componentization—implemented via server‑client designs, a Molecule interface, DI container, SSR optimization, and cross‑platform strategies to enable flexible upgrades and business agility.

ComponentizationFrontend ArchitecturePerformance Optimization
0 likes · 12 min read
Frontend Architecture Design: Evolution and Solutions
Selected Java Interview Questions
Selected Java Interview Questions
Feb 26, 2021 · Backend Development

Understanding IoC: Inversion of Control, Dependency Injection, and Their Benefits

The article explains the core concept of Inversion of Control (IoC), how a third‑party container manages resources to reduce coupling, illustrates the idea with everyday examples, and clarifies the related terms dependency injection and control inversion, especially in the context of Spring.

Backend DevelopmentInversion of ControlIoC
0 likes · 10 min read
Understanding IoC: Inversion of Control, Dependency Injection, and Their Benefits
Programmer DD
Programmer DD
Feb 24, 2021 · Backend Development

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

The article explains Spring's warning about field injection, compares constructor, setter, and field injection methods with code examples, outlines the drawbacks of field injection such as final‑field incompatibility, hidden dependencies, and tight IOC coupling, and recommends using constructor injection for required beans and setter injection for optional ones.

Backend DevelopmentConstructor InjectionField Injection
0 likes · 6 min read
Why Field Injection in Spring Is Discouraged and What to Use Instead
Architect's Tech Stack
Architect's Tech Stack
Feb 18, 2021 · Backend Development

Summary of Design Patterns Used in the Spring Framework

This article provides a comprehensive overview of how Spring implements classic design patterns such as Simple Factory, Factory Method, Singleton, Adapter, Decorator, Proxy, Observer, and Template Method, explaining their implementation details, underlying principles, and practical code examples within the Spring container.

Design PatternsFactoryObserver
0 likes · 15 min read
Summary of Design Patterns Used in the Spring Framework
Java Captain
Java Captain
Feb 13, 2021 · Backend Development

How Spring Solves Circular Dependencies and the Underlying Essence

This article explains how Spring resolves circular dependencies in singleton beans using a three‑level cache, contrasts it with prototype beans, provides a minimal reflective implementation, and draws an analogy to the classic two‑sum algorithm to illustrate the core principle.

BackendDesign PatternsJava
0 likes · 9 min read
How Spring Solves Circular Dependencies and the Underlying Essence
Architect
Architect
Feb 5, 2021 · Backend Development

Spring Container Startup Listeners and Initialization Techniques

This article explains various ways to execute custom logic during Spring container startup, covering bean constructors, @PostConstruct, InitializingBean, ApplicationListener events, @EventListener, constructor injection, CommandLineRunner, and SmartLifecycle, with code examples and usage guidelines.

ApplicationListenerBean InitializationCommandLineRunner
0 likes · 10 min read
Spring Container Startup Listeners and Initialization Techniques
Programmer DD
Programmer DD
Feb 1, 2021 · Backend Development

Unlock Spring’s Power: 9 Essential Design Patterns Every Backend Engineer Should Master

This article explores nine key Spring framework design patterns—including Simple Factory, Factory Method, Singleton, Adapter, Decorator, Proxy, Observer, Strategy, and Template Method—detailing their implementation, underlying principles, and practical code examples, while highlighting how they enable loose coupling and extensibility in backend development.

Backend DevelopmentDesign PatternsJava
0 likes · 15 min read
Unlock Spring’s Power: 9 Essential Design Patterns Every Backend Engineer Should Master
Java Architect Essentials
Java Architect Essentials
Jan 16, 2021 · Backend Development

Integrating Retrofit with Spring Boot Using retrofit‑spring‑boot‑starter

This article explains how to quickly integrate the Retrofit HTTP client into a Spring Boot project with the retrofit‑spring‑boot‑starter, covering dependency setup, configuration annotations, interface definition, custom annotation‑based interceptors, connection‑pool management, logging, exception formatting, call adapters, converters, and global interceptors, all illustrated with complete code examples.

HTTPInterceptorJava
0 likes · 13 min read
Integrating Retrofit with Spring Boot Using retrofit‑spring‑boot‑starter
Top Architect
Top Architect
Jan 9, 2021 · Backend Development

Guice Dependency Injection Tutorial: Modules, Bindings, Scopes, and Assisted Injection

This article introduces Google Guice, a lightweight Java dependency injection framework, covering its core concepts, module configuration, various binding types, scopes, injection methods, provider usage, assisted injection, and includes extensive code examples demonstrating how to replace manual object creation with Guice-managed dependencies.

Assisted InjectionBindingsJava
0 likes · 10 min read
Guice Dependency Injection Tutorial: Modules, Bindings, Scopes, and Assisted Injection
Java Captain
Java Captain
Jan 9, 2021 · Backend Development

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

This article examines whether Service and DAO layers in Java Spring projects should always have interfaces, discusses the arguments for and against using interfaces, and proposes practical structuring and dependency‑injection techniques to decide when interfaces are truly necessary.

InterfaceJavaService Layer
0 likes · 8 min read
Do Service and DAO Layers Need Interfaces? When to Use Them in Spring Projects
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jan 7, 2021 · Backend Development

Overview of Spring Core Components, IOC, AOP, and Related Technologies

This article provides a comprehensive guide to the Spring framework, covering its core modules, the concepts of Inversion of Control and Aspect‑Oriented Programming, various container implementations, proxy mechanisms, bean lifecycle, design patterns, MVC architecture, Spring Boot, Spring Cloud, and common annotations for Java backend development.

BackendJavaProxy
0 likes · 31 min read
Overview of Spring Core Components, IOC, AOP, and Related Technologies
Code Ape Tech Column
Code Ape Tech Column
Jan 7, 2021 · Backend Development

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

This article explains how Spring resolves circular dependencies for singleton beans using a three‑level cache, contrasts it with prototype limitations, provides a minimal container implementation that mimics the mechanism, and draws an analogy to the classic two‑sum algorithm to illustrate the core caching principle.

BackendJavaThree Cache
0 likes · 11 min read
How Spring Solves Circular Dependencies: Inside the Three‑Cache Mechanism
Java Backend Technology
Java Backend Technology
Dec 27, 2020 · Backend Development

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

This article examines whether Service and DAO layers in Spring projects truly require interfaces, debunks common justifications, explores alternative project structures for single and multiple implementations, and offers practical guidelines on when to use or omit interfaces.

Interface DesignService Layerdao
0 likes · 8 min read
Do You Really Need Interfaces for Service and DAO Layers in Spring?
Tuhu Marketing Technology Team
Tuhu Marketing Technology Team
Dec 26, 2020 · Backend Development

Unveiling Spring Boot Auto‑Configuration: How It Works Under the Hood

This article walks through the inner workings of Spring Boot’s auto‑configuration mechanism, starting from a simple Hello World project, dissecting key annotations like @SpringBootApplication and @EnableAutoConfiguration, and tracing the source code of selectors, import groups, and the SpringApplication run process to reveal how beans are discovered, loaded, and registered at startup.

JavaSpring BootSpring Framework
0 likes · 27 min read
Unveiling Spring Boot Auto‑Configuration: How It Works Under the Hood
Architecture Digest
Architecture Digest
Dec 21, 2020 · Backend Development

Do You Need an Interface for the Service Layer? A Critical Examination

This article examines whether a Service layer in a Spring‑based backend project truly requires an interface, debunks common justifications, proposes practical development workflows, and outlines the advantages and drawbacks of using or omitting interfaces in various architectural scenarios.

Backend ArchitectureInterfaceService Layer
0 likes · 8 min read
Do You Need an Interface for the Service Layer? A Critical Examination
vivo Internet Technology
vivo Internet Technology
Dec 9, 2020 · Backend Development

Understanding Dubbo SPI: Features, Implementation and Comparison with JDK SPI

The article explains Service Provider Interface (SPI) concepts, shows how the JDK’s built‑in SPI works, and details Dubbo’s extended SPI mechanism—including named and adaptive extensions, dependency injection, AOP wrappers, and activation filtering—highlighting its richer features and implementation compared to standard Java SPI.

AdaptiveDubboExtensionLoader
0 likes · 26 min read
Understanding Dubbo SPI: Features, Implementation and Comparison with JDK SPI
Code Ape Tech Column
Code Ape Tech Column
Dec 7, 2020 · Backend Development

Unlock Spring’s Power: 9 Design Patterns Every Java Developer Should Master

This article explores nine core design patterns implemented in Spring—simple factory, factory method, singleton, adapter, decorator, proxy, observer, strategy, and template method—detailing their implementation mechanisms, underlying principles, code examples, and practical significance for building loosely coupled, extensible Java applications.

Backend DevelopmentDesign PatternsJava
0 likes · 16 min read
Unlock Spring’s Power: 9 Design Patterns Every Java Developer Should Master