Tagged articles

Spring

1809 articles · Page 16 of 19
Java Backend Technology
Java Backend Technology
Oct 31, 2020 · Backend Development

Mastering Java Exceptions and @Transactional: When Do Transactions Roll Back?

This article explains Java exception categories, distinguishing checked from unchecked exceptions, and shows how Spring's @Transactional annotation controls transaction rollbacks, including configurations for rolling back on checked exceptions, preventing rollback on unchecked ones, and best practices for applying @Transactional in backend services.

JavaSpringexception handling
0 likes · 5 min read
Mastering Java Exceptions and @Transactional: When Do Transactions Roll Back?
Laravel Tech Community
Laravel Tech Community
Oct 28, 2020 · Backend Development

Grails 4.0.5 Release: New Features, Updates, and Improvements

Grails 4.0.5 has been released, introducing new features such as enhanced REST API configuration, plugin.groovy loading, performance optimizations, and updates to Micronaut, Spring, SpringBoot, and GORM Datastore, along with improved documentation and resolved issues.

GrailsGroovyHibernate
0 likes · 2 min read
Grails 4.0.5 Release: New Features, Updates, and Improvements
Top Architect
Top Architect
Oct 24, 2020 · Backend Development

Designing a Unified API Response Format for Java Backend Services

This article explains how to create a consistent JSON response structure for Java backend APIs, covering status‑code conventions, a Result wrapper class, static helper methods, a custom @ResponseResult annotation, response‑body advice, and tips for simplifying controller code and handling exceptions.

API designJavaSpring
0 likes · 7 min read
Designing a Unified API Response Format for Java Backend Services
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 20, 2020 · Backend Development

Programmatic vs Declarative Transactions in Spring: Advantages, Pitfalls, and Recommendations

This article compares Spring's programmatic and declarative transaction management, explains how each works with code examples, outlines the benefits and limitations of declarative transactions—including granularity and failure scenarios—and argues why developers should consider programmatic transactions for clearer control and fewer hidden bugs.

AOPBest PracticesDeclarative Transaction
0 likes · 8 min read
Programmatic vs Declarative Transactions in Spring: Advantages, Pitfalls, and Recommendations
Top Architect
Top Architect
Oct 18, 2020 · Backend Development

Understanding Spring @Enable Annotation Logic and the Role of ConfigurationClassPostProcessor

This article explains how Spring's @Enable annotations are driven by @Import, walks through the entry points in spring.handlers, details the processing flow of ConfigurationClassPostProcessor, distinguishes full and lightweight configuration modes, and describes the CGLIB enhancement that ensures proper @Bean method semantics.

BeanDefinitionCGLIBJava
0 likes · 10 min read
Understanding Spring @Enable Annotation Logic and the Role of ConfigurationClassPostProcessor
Top Architect
Top Architect
Oct 12, 2020 · Backend Development

Comprehensive Guide to Common Spring Framework Annotations

This article provides a comprehensive overview of the most commonly used Spring Framework annotations, including core, stereotype, Spring Boot, MVC/REST, data access, scheduling, and testing annotations, with explanations and code examples illustrating their usage in Java backend development.

DependencyInjectionJavaSpring
0 likes · 12 min read
Comprehensive Guide to Common Spring Framework Annotations
JavaEdge
JavaEdge
Oct 10, 2020 · Fundamentals

Why High‑Level Modules Should Depend on Abstractions: Mastering Dependency Inversion

This article explains the Dependency Inversion Principle, shows why traditional layered architectures suffer from maintenance and reuse problems, provides concrete Java and web examples, and demonstrates how refactoring to abstract interfaces resolves these issues for more flexible, decoupled software design.

Dependency InversionJavaSoftware Architecture
0 likes · 9 min read
Why High‑Level Modules Should Depend on Abstractions: Mastering Dependency Inversion
IT Xianyu
IT Xianyu
Oct 8, 2020 · Backend Development

Overview of Spring, Spring MVC, Spring Boot, and Spring Cloud

This article introduces Spring as a lightweight IoC and AOP container, explains Spring MVC as its web framework, describes Spring Boot's convention‑over‑configuration approach to simplify setup, and outlines how Spring Cloud builds on Spring Boot to provide micro‑service governance.

JavaSpringSpringCloud
0 likes · 3 min read
Overview of Spring, Spring MVC, Spring Boot, and Spring Cloud
Java Captain
Java Captain
Oct 6, 2020 · Backend Development

Integrating Alipay Payment into an SSM (Spring + Spring MVC + MyBatis) Framework

This tutorial walks through the complete process of configuring a sandbox Alipay environment, setting up keys and URLs, defining the database schema, implementing DAO and service layers, and integrating Alipay payment flow into a Java SSM project with detailed code examples and screenshots.

AlipayBackend DevelopmentJava
0 likes · 11 min read
Integrating Alipay Payment into an SSM (Spring + Spring MVC + MyBatis) Framework
Top Architect
Top Architect
Oct 5, 2020 · Backend Development

Deep Dive into Spring Framework Container Startup: Constructor, BeanFactory, Reader, and Scanner Initialization

This article walks through the Spring Framework container startup process, explaining how the AnnotationConfigApplicationContext constructor prepares the environment, registers readers and scanners, initializes the BeanFactory, sets up condition evaluators and post‑processors, and outlines the default filters used for component scanning.

AnnotationConfigApplicationContextBeanFactoryDependency Injection
0 likes · 15 min read
Deep Dive into Spring Framework Container Startup: Constructor, BeanFactory, Reader, and Scanner Initialization
ITPUB
ITPUB
Sep 29, 2020 · Backend Development

Why Spring WebFlux Matters: Moving Beyond Servlet‑Based MVC

This article explains how Spring WebFlux, built on the Reactor project, provides a reactive, non‑blocking alternative to traditional Servlet‑based Spring MVC, detailing its advantages, limitations, and the considerations developers must evaluate before adopting it.

Backend DevelopmentJavaReactive Programming
0 likes · 9 min read
Why Spring WebFlux Matters: Moving Beyond Servlet‑Based MVC
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 26, 2020 · Fundamentals

Understanding Factory Patterns: Simple Factory, Factory Method, and Abstract Factory with Spring Dependency Injection

This article explains the three common factory design patterns—simple factory, factory method, and abstract factory—illustrates their Java implementations with product and factory classes, demonstrates client usage, and shows how Spring's dependency injection can replace manual factory instantiation, providing a comprehensive guide for developers.

Abstract FactoryDependency InjectionDesign Patterns
0 likes · 7 min read
Understanding Factory Patterns: Simple Factory, Factory Method, and Abstract Factory with Spring Dependency Injection
Selected Java Interview Questions
Selected Java Interview Questions
Sep 21, 2020 · Backend Development

Understanding Spring Framework Core Interfaces and Bean Lifecycle from Source Code

This article explains the core interfaces of the Spring Framework, such as BeanDefinition, BeanFactory, ApplicationContext, and BeanPostProcessor, and walks through the bean creation process—including refresh, preInstantiateSingletons, getBean, and the three‑level singleton caches—providing detailed code examples and insights into how Spring resolves circular dependencies.

Bean LifecycleDependency InjectionJava
0 likes · 28 min read
Understanding Spring Framework Core Interfaces and Bean Lifecycle from Source Code
JavaEdge
JavaEdge
Sep 19, 2020 · Backend Development

Mastering Spring Bean Definitions: Naming, Aliases, and Instantiation

Learn how Spring stores bean metadata, the structure of BeanDefinition, naming conventions, alias configuration, and various bean instantiation methods—including constructors, static and instance factory methods—while also discovering how to determine a bean's runtime type using BeanFactory.getType.

BeanDefinitionDependency InjectionJava
0 likes · 11 min read
Mastering Spring Bean Definitions: Naming, Aliases, and Instantiation
Top Architect
Top Architect
Sep 12, 2020 · Backend Development

Key Considerations for Building a Generic TCC Distributed Transaction Framework

This article explains the essential design principles of a TCC (Try‑Confirm‑Cancel) distributed transaction framework, covering the necessity of RM local transactions, integration with Spring's TransactionManager, fault‑recovery mechanisms, idempotency guarantees, and handling of parallel Try/Confirm/Cancel operations.

SpringTCCTransactionManager
0 likes · 22 min read
Key Considerations for Building a Generic TCC Distributed Transaction Framework
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 9, 2020 · Fundamentals

Understanding the Template Method Design Pattern with Java Examples

This article explains the Template Method design pattern, illustrating its structure with Java code examples—including an abstract Drinks class, concrete Tea and Coffee subclasses, hook methods, and real‑world usages in JDK sorting and Spring's application context—while highlighting advantages, drawbacks, and typical scenarios.

Hook MethodJavaSpring
0 likes · 12 min read
Understanding the Template Method Design Pattern with Java Examples
Top Architect
Top Architect
Sep 6, 2020 · Backend Development

Understanding Spring @Transactional: Common Pitfalls and Proper Usage

This article explains how Spring's @Transactional annotation works, common pitfalls such as using it on private methods, and the correct ways to configure propagation, isolation, and bean injection to ensure proper transaction rollback and non‑rollback behavior.

@TransactionalAOPAnnotation
0 likes · 8 min read
Understanding Spring @Transactional: Common Pitfalls and Proper Usage
The Dominant Programmer
The Dominant Programmer
Sep 4, 2020 · Backend Development

Using SpringBoot’s MessageSource.getMessage for Easy i18n Localization

SpringBoot supports internationalization out of the box; by creating a messages.properties file under resources, configuring the basename in application.yml, and using a MessageUtils wrapper that retrieves MessageSource via SpringUtils, developers can fetch localized messages with a single method call.

LocalizationSpringi18n
0 likes · 6 min read
Using SpringBoot’s MessageSource.getMessage for Easy i18n Localization
Top Architect
Top Architect
Aug 30, 2020 · Backend Development

Using Spring Cache with Redis for Efficient Data Caching in Java Applications

This article explains how to accelerate service response by integrating Redis as a key‑value cache with Spring Cache, covering the three‑step implementation, required Maven dependencies, XML configuration, property settings, a custom Cache implementation class, and common Spring Cache annotations.

AOPCacheJava
0 likes · 12 min read
Using Spring Cache with Redis for Efficient Data Caching in Java Applications
Programmer DD
Programmer DD
Aug 28, 2020 · Backend Development

Master Spring Validation: Best Practices and Advanced Techniques

This article provides a comprehensive guide to Spring Validation, covering basic usage, dependency setup, requestBody and requestParam validation, group and nested validation, collection checks, custom constraints, programmatic validation, fail‑fast configuration, and the underlying implementation mechanisms within Spring MVC and Hibernate Validator.

HibernateSpringValidation
0 likes · 17 min read
Master Spring Validation: Best Practices and Advanced Techniques
Su San Talks Tech
Su San Talks Tech
Aug 27, 2020 · Backend Development

Unveiling Spring Transaction Mechanics: From Annotations to Core Interceptors

This article dives deep into Spring's transaction infrastructure, explaining how @EnableTransactionManagement activates transaction support, detailing the roles of key configuration classes, core interceptors, transaction attribute resolution, propagation behaviors, and the commit‑and‑rollback processes that power reliable data operations in Spring and Spring Boot applications.

AOPSpringSpringBoot
0 likes · 32 min read
Unveiling Spring Transaction Mechanics: From Annotations to Core Interceptors
Top Architect
Top Architect
Aug 22, 2020 · Backend Development

Comprehensive Guide to Spring Validation: Usage, Advanced Features, and Implementation Principles

This article provides a thorough tutorial on Spring Validation, covering basic usage with requestBody and requestParam, dependency setup, group, nested, collection and custom validations, programmatic validation, fail‑fast mode, differences between @Valid and @Validated, as well as the underlying implementation mechanisms in Spring MVC and method‑level AOP validation.

APIHibernate ValidatorJava
0 likes · 17 min read
Comprehensive Guide to Spring Validation: Usage, Advanced Features, and Implementation Principles
Java Captain
Java Captain
Aug 21, 2020 · Backend Development

Creating Custom Annotations for Validation, Permission, and Caching in Java Backend Development

This article explains how to design and implement custom Java annotations for field validation, permission checks, and caching, covering annotation definitions, target and retention policies, validator classes, interceptor and aspect implementations, and practical usage examples within Spring MVC.

Backend DevelopmentCustom AnnotationsJava
0 likes · 9 min read
Creating Custom Annotations for Validation, Permission, and Caching in Java Backend Development
Programmer DD
Programmer DD
Aug 19, 2020 · Backend Development

Unlocking Spring’s @Async: Deep Dive into Mechanics, Pitfalls, and Solutions

This article explores Spring’s @Async annotation in depth, detailing its basic usage, underlying proxy creation, pointcut logic, and asynchronous execution, while highlighting common issues such as circular dependencies and inefficient default thread pools, and providing practical solutions like lazy injection and custom executors.

AOPDependencyInjectionSpring
0 likes · 15 min read
Unlocking Spring’s @Async: Deep Dive into Mechanics, Pitfalls, and Solutions
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Aug 18, 2020 · Backend Development

Implementing Scheduled Tasks in Java: Timer, ScheduledExecutorService, Spring Task, and Distributed Approaches

This article explains several ways to implement scheduled tasks in Java, covering the simple Timer class, the more robust ScheduledExecutorService, Spring's @Scheduled annotation, and distributed solutions using Redis ZSet and key‑space notifications, with code examples and practical considerations.

Distributed SchedulingJavaRedis
0 likes · 16 min read
Implementing Scheduled Tasks in Java: Timer, ScheduledExecutorService, Spring Task, and Distributed Approaches
Java Backend Technology
Java Backend Technology
Aug 18, 2020 · Backend Development

Why Spring Controllers Are Not Thread‑Safe and How to Fix Them

Spring MVC controllers are singleton by default, which can cause thread‑unsafe behavior when using non‑static member variables; this article demonstrates the issue with example endpoints, shows how prototype scope resolves it, and outlines best practices such as avoiding stateful fields or using ThreadLocal.

Bean ScopeControllerJava
0 likes · 5 min read
Why Spring Controllers Are Not Thread‑Safe and How to Fix Them
Programmer DD
Programmer DD
Aug 6, 2020 · Backend Development

When to Use @Validated vs @Valid for Nested Validation in Spring

This article explains the differences between Spring's @Validated and the standard @Valid annotations, covering grouping support, where each can be applied, and how to enable nested validation for complex objects in controller parameters.

Nested ValidationSpringValidation
0 likes · 6 min read
When to Use @Validated vs @Valid for Nested Validation in Spring
Programmer DD
Programmer DD
Aug 6, 2020 · Backend Development

Mastering Spring @Transactional: Exception Types and Rollback Strategies

This article explains Java exception classifications, how Spring's @Transactional handles checked and unchecked exceptions, and provides practical configurations to control transaction rollbacks, while offering best‑practice notes on annotation placement and method design.

@TransactionalSpringTransaction
0 likes · 6 min read
Mastering Spring @Transactional: Exception Types and Rollback Strategies
Programmer DD
Programmer DD
Jul 30, 2020 · Backend Development

When to Use Apache vs Spring BeanUtils for Java Object Copying

This article explains the differences between Apache BeanUtils and Spring BeanUtils for copying Java objects, covering shallow vs deep copy concepts, performance drawbacks of Apache's implementation, usage examples, and recommendations for alternative tools like CGLIB BeanCopier and Orika.

BeanUtilsDeepCopyObjectCopy
0 likes · 9 min read
When to Use Apache vs Spring BeanUtils for Java Object Copying
FunTester
FunTester
Jul 30, 2020 · Backend Development

Why a Misused Transaction Propagation Caused Connection Exhaustion and How to Fix It

A Java Spring service method misused map.contains and REQUIRES_NEW transaction propagation, leading to unreleased DB connections and a CannotCreateTransactionException, and the article walks through the bug, its root causes, and concrete fixes including correct key checks and timeout settings.

ConcurrencyDatabaseJava
0 likes · 7 min read
Why a Misused Transaction Propagation Caused Connection Exhaustion and How to Fix It
Selected Java Interview Questions
Selected Java Interview Questions
Jul 27, 2020 · Backend Development

Understanding Spring Controller Scope and Thread Safety

The article explains why Spring MVC controllers are singleton by default, demonstrates the resulting thread‑unsafe behavior with example code, shows how applying @Scope("prototype") makes them prototype scoped, and provides best‑practice recommendations and a summary of Spring bean scopes.

BeanControllerPrototype
0 likes · 5 min read
Understanding Spring Controller Scope and Thread Safety
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jul 27, 2020 · Backend Development

Detailed Guide to Using @EnableAsync and @Async for Asynchronous Bean Method Execution in Spring

This article provides a comprehensive explanation of Spring's @EnableAsync and @Async annotations, covering their purpose, usage steps, handling of return values, custom thread‑pool configuration, exception handling, thread‑pool isolation, and the underlying AOP mechanism, supplemented with complete code examples.

ConcurrencyJavaSpring
0 likes · 18 min read
Detailed Guide to Using @EnableAsync and @Async for Asynchronous Bean Method Execution in Spring
Programmer DD
Programmer DD
Jul 27, 2020 · Backend Development

Why MyBatis Outperforms Hibernate for Modern Java Back‑End Projects

The article examines a Spring‑related Twitter poll, Google Trends, and Stack Overflow statistics to compare MyBatis, Hibernate, and JPA, then argues that MyBatis’ simplicity and flexibility make it better suited for today’s fast‑paced backend development.

HibernateMyBatisORM
0 likes · 5 min read
Why MyBatis Outperforms Hibernate for Modern Java Back‑End Projects
Programmer DD
Programmer DD
Jul 26, 2020 · Backend Development

How Does Spring Parse @Component and @Service Annotations? A Deep Dive

This article explains the internal workflow of Spring's annotation processing, detailing how @Component and its specializations like @Service are discovered through XML namespace handlers, classpath scanning, metadata readers, and meta‑annotation handling, complete with code excerpts and step‑by‑step analysis.

Annotation ProcessingSpringcomponent scanning
0 likes · 12 min read
How Does Spring Parse @Component and @Service Annotations? A Deep Dive
Top Architect
Top Architect
Jul 21, 2020 · Backend Development

How Spring Solves Circular Dependencies and the Underlying Essence

This article explains how Spring resolves circular dependencies for singleton beans using a three‑level cache, demonstrates a simple prototype implementation, draws an analogy to the classic two‑sum algorithm, and highlights the core principle behind Spring's dependency injection mechanism.

Dependency InjectionJavaSpring
0 likes · 9 min read
How Spring Solves Circular Dependencies and the Underlying Essence
Selected Java Interview Questions
Selected Java Interview Questions
Jul 18, 2020 · Backend Development

Deep Dive into Spring IOC Container Initialization Process

This article provides a comprehensive, step‑by‑step analysis of how Spring's IoC container is initialized, covering resource loading, BeanDefinition creation, BeanFactory setup, template‑method refresh logic, and practical debugging tips, all illustrated with UML diagrams and code snippets.

Dependency InjectionDesign PatternsIOC
0 likes · 20 min read
Deep Dive into Spring IOC Container Initialization Process
Architecture Digest
Architecture Digest
Jul 18, 2020 · Backend Development

Understanding How Spring Handles Circular Dependencies and Its Core Principle

This article explains Spring's three‑level cache mechanism for resolving circular dependencies in singleton beans, demonstrates a simplified implementation with Java code, draws an analogy to the classic two‑sum algorithm, and highlights the essential idea behind circular dependency handling.

Springcircular dependencydependency-injection
0 likes · 9 min read
Understanding How Spring Handles Circular Dependencies and Its Core Principle
Programmer DD
Programmer DD
Jun 29, 2020 · Backend Development

Why Spring Beans Aren’t Thread‑Safe and How ThreadLocal Solves It

This article explains that Spring does not guarantee thread safety for its beans, describes the various bean scopes, clarifies why stateless singleton beans are safe, and shows how ThreadLocal works—including its implementation, usage, and potential memory‑leak pitfalls—so developers can write correct concurrent code.

ConcurrencyJavaSpring
0 likes · 17 min read
Why Spring Beans Aren’t Thread‑Safe and How ThreadLocal Solves It
FunTester
FunTester
Jun 20, 2020 · Backend Development

Mastering MySQL CASE WHEN and MyBatis Dynamic Queries for Test Case Search

This article walks through building complex test‑case search queries using MySQL CASE WHEN, FIND_IN_SET, and MyBatis dynamic SQL, demonstrates converting asynchronous data fetches to synchronous calls with CountDownLatch in Spring, and provides complete Java bean and configuration examples.

JavaMyBatisMySQL
0 likes · 9 min read
Mastering MySQL CASE WHEN and MyBatis Dynamic Queries for Test Case Search
Beike Product & Technology
Beike Product & Technology
Jun 18, 2020 · Databases

Resolving Duplicate Income Splitting in a Financial System: Transaction Isolation, Spring Propagation, and Redis Lock

This article analyzes a financial system's duplicate income‑splitting bug caused by concurrent transactions, explains how MySQL isolation levels and Spring transaction propagation contributed to dirty reads, and presents two corrective approaches—adjusting transaction propagation and repositioning Redis locks—to ensure reliable data consistency.

DatabaseMySQLRedis
0 likes · 10 min read
Resolving Duplicate Income Splitting in a Financial System: Transaction Isolation, Spring Propagation, and Redis Lock
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jun 7, 2020 · Fundamentals

Introduction to Java Reflection

This article explains Java's reflection mechanism, covering how to obtain Class objects, the java.lang.reflect API, practical code examples, common use cases such as dynamic proxies, JDBC driver loading, Spring bean initialization, and discusses the advantages and performance drawbacks of using reflection.

Dynamic ProxyJDBCJava
0 likes · 13 min read
Introduction to Java Reflection
Architect's Tech Stack
Architect's Tech Stack
Jun 1, 2020 · Backend Development

Fundamentals and Advanced Concepts of Spring Transaction Management

This article explains the core principles of Spring transaction management, including JDBC transaction steps, declarative @Transactional usage, AOP proxy mechanisms, propagation behaviors, isolation levels, nested transactions, and Spring Boot support, while also providing code examples and practical guidance for developers.

AOPSpringTransaction
0 likes · 14 min read
Fundamentals and Advanced Concepts of Spring Transaction Management
Programmer DD
Programmer DD
May 21, 2020 · Backend Development

Mastering Spring 5 Functional Endpoints: A Hands‑On Guide

This article shows how to replace traditional Spring MVC annotations with Spring 5's functional routing API, covering dependencies, RouterFunction, ServerRequest/ServerResponse, HandlerFunction, RequestPredicate, and demonstrating practical code examples and expected responses.

Functional EndpointsJavaRouterFunction
0 likes · 6 min read
Mastering Spring 5 Functional Endpoints: A Hands‑On Guide
Selected Java Interview Questions
Selected Java Interview Questions
May 17, 2020 · Backend Development

Applying Strategy, Factory Method, and Builder Patterns in Spring for Reward Distribution

This article explains how to implement the Strategy, Factory Method, and Builder design patterns within a Spring application to decouple reward‑distribution logic, showing interface definitions, concrete implementations, a factory for dynamic bean selection, and a prototype‑scoped builder for request construction.

BuilderDesign PatternsFactory Method
0 likes · 12 min read
Applying Strategy, Factory Method, and Builder Patterns in Spring for Reward Distribution
Top Architect
Top Architect
May 11, 2020 · Backend Development

WebSocket Architecture Design and Implementation with Spring, SockJS, and STOMP

This article explains the principles and practical implementation of WebSocket, compares it with HTTP, discusses when to use it, and details a complete backend and frontend solution using Spring WebSocket, SockJS, and STOMP for real‑time communication in web applications.

Backend DevelopmentReal‑time communicationSpring
0 likes · 21 min read
WebSocket Architecture Design and Implementation with Spring, SockJS, and STOMP
Architect's Tech Stack
Architect's Tech Stack
May 9, 2020 · Backend Development

Unified Exception Handling and Assertion Techniques in Java Backend Development

This article explains how to replace repetitive try‑catch blocks in Java backend services with a unified exception handling framework using Spring's @ControllerAdvice, custom @ExceptionHandler methods, enum‑based error codes, and assertion utilities, improving code readability, maintainability, and error response consistency.

Design PatternsSpring
0 likes · 21 min read
Unified Exception Handling and Assertion Techniques in Java Backend Development
macrozheng
macrozheng
May 9, 2020 · Backend Development

How Does Spring Resolve Circular Dependencies? Inside the Three‑Level Cache

This article explains how Spring handles circular dependencies in singleton beans by using a three‑level cache, contrasts it with prototype beans that cannot participate, and demonstrates a minimal implementation that mimics Spring's approach, linking the concept to the classic two‑sum algorithm.

Backend DevelopmentDependency InjectionJava
0 likes · 10 min read
How Does Spring Resolve Circular Dependencies? Inside the Three‑Level Cache
Java Captain
Java Captain
May 4, 2020 · Backend Development

How Spring Solves Circular Dependencies and the Underlying Essence

This article explains how Spring resolves circular dependencies for singleton beans using a three‑level cache, demonstrates a simple prototype implementation that mimics Spring's behavior, and relates the problem to the classic two‑sum algorithm to reveal its fundamental nature.

BeanDependency InjectionJava
0 likes · 9 min read
How Spring Solves Circular Dependencies and the Underlying Essence
Architect's Tech Stack
Architect's Tech Stack
May 3, 2020 · Backend Development

Unified Exception Handling in Spring Boot: Reducing Try‑Catch Boilerplate with @ControllerAdvice, Assert Utilities, and Enum‑Based Error Codes

This article explains how to implement unified exception handling in Spring Boot using @ControllerAdvice and custom Assert utilities, demonstrates reducing repetitive try‑catch blocks with enum‑based error codes, and shows practical testing of various error scenarios including 404, validation, and database failures.

EnumSpringUnified Response
0 likes · 22 min read
Unified Exception Handling in Spring Boot: Reducing Try‑Catch Boilerplate with @ControllerAdvice, Assert Utilities, and Enum‑Based Error Codes
Java Backend Technology
Java Backend Technology
May 3, 2020 · Backend Development

How Spring Solves Circular Dependencies: The 3‑Cache Trick Explained

This article explains how Spring resolves circular dependencies in singleton beans using a three‑level cache, why prototype beans cannot participate, provides a minimal example implementation, and draws an analogy to the classic two‑sum algorithm to illustrate the underlying principle.

Dependency InjectionJavaSpring
0 likes · 10 min read
How Spring Solves Circular Dependencies: The 3‑Cache Trick Explained
Selected Java Interview Questions
Selected Java Interview Questions
May 1, 2020 · Backend Development

Understanding the Bean Lifecycle in Spring ApplicationContext

This article explains the Spring bean lifecycle within an ApplicationContext, detailing container‑level, factory‑level, and bean‑level post‑processors, showing how to implement and register custom processors, and providing code examples and XML configuration to illustrate the execution order and practical usage.

ApplicationContextBean LifecycleBeanPostProcessor
0 likes · 9 min read
Understanding the Bean Lifecycle in Spring ApplicationContext
Java Captain
Java Captain
May 1, 2020 · Backend Development

Unified Exception Handling in Spring Boot Using Assert and Enum-based Error Codes

This article demonstrates how to replace repetitive try‑catch blocks in Java Spring applications with a unified exception handling approach that leverages @ControllerAdvice, custom Assert utilities, and enum‑based error codes to produce clean, maintainable, and internationalized error responses across controllers and services.

EnumJavaSpring
0 likes · 20 min read
Unified Exception Handling in Spring Boot Using Assert and Enum-based Error Codes
Java Captain
Java Captain
Apr 25, 2020 · Backend Development

Deep Dive into Spring Boot Auto‑Configuration Mechanism

This article examines Spring Boot's auto‑configuration process by analyzing the source code of @SpringBootApplication, @EnableAutoConfiguration, and related classes, explaining how the framework loads configuration classes via SpringFactoriesLoader, processes deferred import selectors, and integrates with the application context during startup.

AutoConfigurationJavaSpring
0 likes · 26 min read
Deep Dive into Spring Boot Auto‑Configuration Mechanism
21CTO
21CTO
Apr 23, 2020 · Backend Development

Avoid These Hidden Java Pitfalls: Object Comparison, Generics, and CGLIB Proxy Gotchas

This article reveals common Java pitfalls—from using Objects.equals versus ==, ternary operator type conversion, generic type mismatches, Set deduplication, BeanUtils property copying, to CGLIB proxy quirks—and provides concrete analysis and practical avoidance techniques for each case.

Best PracticesCGLIBCollections
0 likes · 28 min read
Avoid These Hidden Java Pitfalls: Object Comparison, Generics, and CGLIB Proxy Gotchas
Java Backend Technology
Java Backend Technology
Apr 23, 2020 · Backend Development

Why Spring’s Constructor Injection Fails on Circular Dependencies (and How Setters Help)

This article explains what circular dependencies are in Spring, shows three ways the framework handles them—constructor injection, singleton setter injection, and prototype setter injection—illustrates each with Java classes and XML configuration, and clarifies why only the singleton setter approach avoids runtime errors.

Bean ScopeConstructor InjectionDependency Injection
0 likes · 9 min read
Why Spring’s Constructor Injection Fails on Circular Dependencies (and How Setters Help)
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 10, 2020 · Backend Development

How to Read and Debug the Spring Framework Source Code

This article explains the benefits of reading source code and provides a step‑by‑step guide for setting up a Gradle‑based environment, downloading, importing, compiling, and debugging Spring Framework source code with practical code examples and IDE configuration tips.

JavaSource CodeSpring
0 likes · 10 min read
How to Read and Debug the Spring Framework Source Code
Wukong Talks Architecture
Wukong Talks Architecture
Apr 9, 2020 · Backend Development

Initializing the PassJava Project and Adding Microservices

This tutorial walks through creating an empty GitHub repository, importing it, adding a content service and additional microservices, configuring the Maven parent pom, setting up a root Maven configuration and .gitignore, and finally committing the code for the PassJava Java microservice suite.

GitJavaMaven
0 likes · 5 min read
Initializing the PassJava Project and Adding Microservices
JD Retail Technology
JD Retail Technology
Apr 8, 2020 · Backend Development

Building a Simplified Spring Framework: Step‑by‑Step IOC, DI, and MVC Implementation

This article walks through creating a lightweight Spring‑like framework in Java, detailing the project structure, startup process, MVC module initialization, core IOC container design, BeanDefinition handling, bean registration, dependency injection, and circular‑dependency resolution, all illustrated with diagrams and code snippets.

IOCMVCSpring
0 likes · 7 min read
Building a Simplified Spring Framework: Step‑by‑Step IOC, DI, and MVC Implementation
ITFLY8 Architecture Home
ITFLY8 Architecture Home
Apr 5, 2020 · Backend Development

How Spring’s @Transactional Works Under the Hood and Build Your Own Transaction Annotation

This article explains Spring Boot’s @Transactional implementation, covers transaction isolation levels and propagation, walks through the core source code of TransactionInterceptor and PlatformTransactionManager, and guides you step‑by‑step to create a custom annotation that rolls back on specified exceptions using JDBC and AOP.

AOPAnnotationJDBC
0 likes · 15 min read
How Spring’s @Transactional Works Under the Hood and Build Your Own Transaction Annotation
Top Architect
Top Architect
Apr 1, 2020 · Backend Development

How to Prepare for Java Junior and Senior Technical Interviews

Preparing thoroughly for Java junior and senior technical interviews requires covering core Java concepts, Spring and Spring Boot frameworks, database fundamentals, multithreading, JVM internals, and architectural knowledge, while practicing problem‑solving and understanding interviewers' expectations to increase success chances.

JVMJavaSpring
0 likes · 10 min read
How to Prepare for Java Junior and Senior Technical Interviews
macrozheng
macrozheng
Mar 27, 2020 · Backend Development

Why @Transactional Fails: 6 Common Pitfalls and How to Fix Them

This article explains the purpose of Spring's @Transactional annotation, details its configurable attributes, and enumerates six typical scenarios—such as non‑public methods, wrong propagation settings, self‑invocation, and unsupported database engines—that cause the annotation to become ineffective, providing code examples and solutions.

@TransactionalAOPDatabase
0 likes · 12 min read
Why @Transactional Fails: 6 Common Pitfalls and How to Fix Them
Senior Brother's Insights
Senior Brother's Insights
Mar 25, 2020 · Backend Development

Master Java Reflection: From Basics to Advanced Usage

This article provides a comprehensive guide to Java's reflection mechanism, covering its definition, core capabilities, practical code examples, common API usage, and considerations such as performance and security, enabling developers to understand and apply reflection effectively in real-world projects.

APIJavaReflection
0 likes · 10 min read
Master Java Reflection: From Basics to Advanced Usage