Tagged articles

spring

1810 articles · Page 8 of 19
JD Cloud Developers
JD Cloud Developers
Dec 12, 2023 · Backend Development

Why @ResponseBody Fails When Writing Directly to the Output Stream in Spring

This article analyzes a Spring MVC issue where a batch template download failed due to missing configuration, explores how @ResponseBody interacts with manual stream writes, presents code examples, debugging insights, and offers best‑practice recommendations for reliable file‑download endpoints.

FileDownloadJavaResponseBody
0 likes · 5 min read
Why @ResponseBody Fails When Writing Directly to the Output Stream in Spring
macrozheng
macrozheng
Dec 12, 2023 · Backend Development

Mastering Retry Strategies in Java: 8 Proven Methods for Reliable API Calls

This article explains why retry mechanisms are essential for distributed Java applications and walks through eight practical implementations—including loop, recursion, Apache HttpClient, Spring Retry, Resilience4j, custom utilities, asynchronous thread‑pool retries, and message‑queue based retries—plus best‑practice guidelines to avoid common pitfalls.

HttpClientJavaResilience4j
0 likes · 17 min read
Mastering Retry Strategies in Java: 8 Proven Methods for Reliable API Calls
政采云技术
政采云技术
Dec 12, 2023 · Backend Development

Understanding Spring's Circular Dependency Resolution via Three-Level Caches

This article explains how Spring handles common circular dependencies between singleton Beans by employing a three‑level cache (singletonObjects, earlySingletonObjects, singletonFactories), detailing the prerequisites, cache structures, workflow, and key source code snippets that illustrate the underlying mechanism.

Backend DevelopmentBeanThree-level Cache
0 likes · 10 min read
Understanding Spring's Circular Dependency Resolution via Three-Level Caches
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 11, 2023 · Backend Development

Mastering Spring 6 REST Calls: WebClient, RestTemplate, HTTP Interface & RestClient

Spring 6 offers four powerful ways to perform remote HTTP calls—WebClient, RestTemplate, HTTP Interface, and RestClient—each with distinct APIs, configuration options, and usage patterns, and this guide walks through their setup, method signatures, request handling, and error management for Java developers.

JavaRESTRestClient
0 likes · 12 min read
Mastering Spring 6 REST Calls: WebClient, RestTemplate, HTTP Interface & RestClient
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Dec 7, 2023 · Backend Development

In-Depth Analysis of XXL‑RPC Framework: Design, Implementation, and Source Code Walkthrough

This article provides a comprehensive overview of the lightweight XXL‑RPC framework, covering fundamental RPC concepts, the framework's architecture built on Spring and Netty, detailed provider and consumer implementations, various call types, and the service registry‑discovery mechanism, concluding with practical insights for developers.

JavaMicroservicesNetty
0 likes · 17 min read
In-Depth Analysis of XXL‑RPC Framework: Design, Implementation, and Source Code Walkthrough
Architecture Digest
Architecture Digest
Dec 5, 2023 · Backend Development

Common Java Backend Code Smells and Bugs: Real‑World Cases and Fixes

The article presents a collection of typical Java backend coding mistakes—ranging from misused ternary operators and poor parameter validation to logging pitfalls, dead code, improper exception handling, AOP self‑invocation issues, Redis resilience problems, and Excel file upload bugs—along with concrete examples, images, and corrected code snippets to help developers avoid and fix them.

BackendBugFixesCodeQuality
0 likes · 12 min read
Common Java Backend Code Smells and Bugs: Real‑World Cases and Fixes
Architect
Architect
Dec 4, 2023 · Backend Development

Mastering Unified Exception Handling in Spring: Clean Code, Better Readability

This article analyzes the problem of scattered try‑catch blocks in Java services, explains why per‑controller exception methods are cumbersome, and presents a unified exception handling solution using @ControllerAdvice, custom Assert utilities, enum‑based error codes, and environment‑aware response formatting, all illustrated with concrete code examples and test results.

BackendEnumJava
0 likes · 24 min read
Mastering Unified Exception Handling in Spring: Clean Code, Better Readability
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.

Dependency InjectionJavaPerformance
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.

Backend DevelopmentDependency InjectionImport Annotation
0 likes · 6 min read
Mastering Spring’s @Import: Three Powerful Ways to Load Configurations
Architect
Architect
Dec 1, 2023 · Backend Development

Implementing a Process Pool with Apache Commons GenericObjectPool in Java

This article explains how to use Apache Commons GenericObjectPool to implement a reusable process pool in Java, covering the underlying concepts, required dependencies, custom factory implementation, pool configuration, and example code for borrowing and returning pooled objects.

BackendGenericObjectPoolJava
0 likes · 9 min read
Implementing a Process Pool with Apache Commons GenericObjectPool in Java
Java Architect Essentials
Java Architect Essentials
Nov 29, 2023 · Backend Development

Performance Tuning of a Java Backend Service: From 50/s to 500/s Through Profiling, Thread‑Pool, and SQL Optimization

The article details a step‑by‑step investigation and optimization of a Java backend service that initially delivered only 50 requests per second under load, covering profiling, slow‑SQL fixes, thread‑pool tuning, JVM memory adjustments, and Spring bean creation overhead to approach the target 500 req/s.

JavaPerformanceProfiling
0 likes · 14 min read
Performance Tuning of a Java Backend Service: From 50/s to 500/s Through Profiling, Thread‑Pool, and SQL Optimization
Architect
Architect
Nov 27, 2023 · Backend Development

Why 500 req/s Became 50 req/s: A Deep Dive into Spring Bean Creation Bottlenecks

A ToB system that seemed able to handle 500 requests per second stalled at 50 req/s due to hidden lock contention in prototype‑scoped Spring beans, slow SQL updates, excessive logging, and thread‑pool misconfiguration, prompting a step‑by‑step performance investigation and multiple optimizations.

JavaOptimizationPerformance
0 likes · 16 min read
Why 500 req/s Became 50 req/s: A Deep Dive into Spring Bean Creation Bottlenecks
Architect's Guide
Architect's Guide
Nov 27, 2023 · Backend Development

Unified Exception Handling in Spring Boot: Design, Implementation, and Best Practices

This article provides a comprehensive guide to designing and implementing a unified exception handling framework in Spring Boot, covering the use of @ControllerAdvice, custom assertion interfaces, enum‑based error codes, standardized response structures, and practical testing scenarios to improve code readability and robustness.

BackendEnumJava
0 likes · 20 min read
Unified Exception Handling in Spring Boot: Design, Implementation, and Best Practices
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 25, 2023 · Backend Development

Understanding Spring’s FactoryBean and MyBatis Integration: From BeanFactory to MapperFactoryBean

This article explains how Spring’s FactoryBean mechanism enables seamless integration with MyBatis by detailing the roles of BeanFactory, SqlSessionFactoryBean, MapperScannerConfigurer, and MapperFactoryBean, and provides annotated code examples and XML configuration to illustrate the underlying process and its benefits for transaction management and thread safety.

Backend DevelopmentJavaMyBatis
0 likes · 13 min read
Understanding Spring’s FactoryBean and MyBatis Integration: From BeanFactory to MapperFactoryBean
Java Architect Essentials
Java Architect Essentials
Nov 23, 2023 · Backend Development

Overview of Spring Assertion, Utility, Reflection and AOP Helper Methods

This article presents a concise reference of Spring's Assert class, common ObjectUtils, StringUtils, CollectionUtils, file and stream copy helpers, as well as ReflectionUtils and AOP utilities, illustrating their purpose, typical usage scenarios, and providing ready‑to‑copy code snippets for Java backend development.

BackendJavaReflection
0 likes · 11 min read
Overview of Spring Assertion, Utility, Reflection and AOP Helper Methods
Architecture Digest
Architecture Digest
Nov 23, 2023 · Backend Development

Using Redisson Distributed Locks with Custom Annotations in Java

This article explains how to apply Redisson's distributed lock in Java, demonstrates the basic lock and tryLock APIs, shows how to create a custom @DistributedLock annotation and an AOP aspect to handle locking automatically, and provides a practical usage example with two services.

AOPAnnotationDistributed Lock
0 likes · 8 min read
Using Redisson Distributed Locks with Custom Annotations in Java
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 23, 2023 · Backend Development

Mastering Spring’s Type Conversion: Services, Custom Converters, and Best Practices

This article explains Spring’s type conversion system, introduces the core conversion service interfaces, demonstrates how to use GenericConversionService, DefaultConversionService, and WebConversionService, and provides step‑by‑step examples of custom converters, factories, generic converters, and their registration in Spring MVC.

JavaSpring Frameworkspring
0 likes · 13 min read
Mastering Spring’s Type Conversion: Services, Custom Converters, and Best Practices
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 ResponsibilityDependency InjectionDesign Patterns
0 likes · 13 min read
Mastering the Chain of Responsibility: From SOLID Principles to Spring Integration
Selected Java Interview Questions
Selected Java Interview Questions
Nov 21, 2023 · Backend Development

Design and Implementation of a Generic Asynchronous Processing SDK for Spring Applications

This article introduces a generic asynchronous processing SDK for Spring-based backend systems, explaining its purpose, advantages, underlying principles, components such as Kafka, XXL‑Job, MySQL, and Vue, design patterns employed, database schema, configuration via Apollo, usage examples, and deployment details.

Kafkadesign-patternssdk
0 likes · 8 min read
Design and Implementation of a Generic Asynchronous Processing SDK for Spring Applications
Senior Brother's Insights
Senior Brother's Insights
Nov 20, 2023 · Backend Development

Mastering the Chain of Responsibility Pattern for Scalable Product Validation in Java

This article explains the Chain of Responsibility design pattern, shows how to apply it to multi‑step product creation validation and expense‑approval workflows, walks through abstract and concrete handler implementations, dynamic configuration, and client execution with full Java code examples.

Backend DevelopmentChain of ResponsibilityDesign Patterns
0 likes · 20 min read
Mastering the Chain of Responsibility Pattern for Scalable Product Validation in Java
IT Architects Alliance
IT Architects Alliance
Nov 17, 2023 · Backend Development

Design and Implementation of a Generic Asynchronous Processing SDK

This article introduces a generic asynchronous processing SDK for Java Spring applications, covering its purpose, advantages, underlying principles, component choices such as Kafka, XXL‑Job, MySQL, design patterns, database schema, configuration via Apollo, usage instructions, safety considerations, and provides code examples and a GitHub repository link.

AOPKafkaMySQL
0 likes · 9 min read
Design and Implementation of a Generic Asynchronous Processing SDK
Architect
Architect
Nov 13, 2023 · Backend Development

Designing a Robust Asynchronous Processing SDK with Spring, Kafka, and MySQL

This article explains why asynchronous processing is needed in evolving systems, outlines the goals of guaranteeing execution without blocking the main flow, and walks through a complete SDK design that uses Spring transaction events, Kafka, XXL‑Job, MySQL, and a Vue UI, including configuration, code snippets, and deployment details.

BackendKafkaMySQL
0 likes · 10 min read
Designing a Robust Asynchronous Processing SDK with Spring, Kafka, and MySQL
Selected Java Interview Questions
Selected Java Interview Questions
Nov 10, 2023 · Backend Development

Design and Implementation of a Generic Asynchronous Processing SDK for Java Backend Systems

This article introduces a generic asynchronous processing SDK for Java back‑ends, explaining its purpose, advantages, underlying principles, components, design patterns, database schema, configuration, usage, and operational considerations, and provides complete code and configuration examples.

Backend DevelopmentJavaKafka
0 likes · 9 min read
Design and Implementation of a Generic Asynchronous Processing SDK for Java Backend Systems
Architect
Architect
Nov 9, 2023 · Backend Development

How Vivo’s LuBan Service Generates Billions of Unique IDs with Sub‑millisecond Latency

This article explains the business scenarios that drive the need for globally unique distributed IDs, analyzes the challenges of uniqueness, performance, and availability, and details Vivo's self‑built LuBan ID service—including its architecture, three ID formats, custom extensions, SDK usage, performance optimizations, and real‑world deployment metrics.

Distributed IDJavaLuBan
0 likes · 18 min read
How Vivo’s LuBan Service Generates Billions of Unique IDs with Sub‑millisecond Latency
Architecture Digest
Architecture Digest
Nov 9, 2023 · Backend Development

Elegant Unified Exception Handling in Spring Using Assertions and Enums

This article explains how to replace repetitive try‑catch blocks in Spring applications with a clean, assertion‑based approach combined with @ControllerAdvice and enum‑driven error codes, providing a unified way to handle service‑layer, controller‑layer, and unknown exceptions while keeping responses consistent and internationalized.

@ControllerAdviceBackendEnums
0 likes · 20 min read
Elegant Unified Exception Handling in Spring Using Assertions and Enums
Java Backend Technology
Java Backend Technology
Nov 9, 2023 · Backend Development

Boosting Java Service Throughput from 50/s to 500/s: My Performance Tuning Journey

Faced with a client demanding 500 requests per second, I discovered my Java backend only handled 50 /s due to slow SQL, excessive logging, thread‑pool misconfiguration, and costly Spring bean creation; by adding latency alerts, async execution, reducing thread counts, and fixing Redis bean scope, throughput nearly doubled.

JavaProfilingspring
0 likes · 15 min read
Boosting Java Service Throughput from 50/s to 500/s: My Performance Tuning Journey
JD Retail Technology
JD Retail Technology
Nov 7, 2023 · Backend Development

Practical Cases of Using ChatGPT for Backend Development Tasks

This document presents a series of real‑world examples showing how ChatGPT can assist cloud‑trading developers with backend tasks such as resource scheduling, regex interpretation, CSV generation, JavaBean‑to‑JSON conversion, Spring IoC learning, JSON formatting, Java 8 stream processing, and CI pipeline error analysis.

CSVChatGPTJava
0 likes · 5 min read
Practical Cases of Using ChatGPT for Backend Development Tasks
Architect's Guide
Architect's Guide
Nov 4, 2023 · Backend Development

Eliminating Code Duplication in Java Backend Development with Design Patterns, Annotations, and Bean Mapping

This article explains how to reduce repetitive Java backend code by extracting common logic into abstract classes, applying the Template Method and Factory patterns, using custom annotations with reflection for API serialization, and leveraging bean‑mapping utilities to copy properties between DTOs and DOs.

Code RefactoringDesign PatternsJava
0 likes · 21 min read
Eliminating Code Duplication in Java Backend Development with Design Patterns, Annotations, and Bean Mapping
Architect
Architect
Nov 1, 2023 · Backend Development

Mastering Distributed Locks with Redis: From Basics to Advanced Solutions

This article examines why local locks fail in distributed micro‑service environments, introduces Redis‑based distributed locking, walks through five incremental lock designs—from a simple SETNX implementation to a Lua‑script atomic solution—highlighting each scheme's trade‑offs, code examples, and practical pitfalls.

Distributed LockJavaLua
0 likes · 18 min read
Mastering Distributed Locks with Redis: From Basics to Advanced Solutions
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 1, 2023 · Backend Development

Mastering Spring Event Mechanism: Custom Events, Listeners, Async & Ordering

This article introduces Spring's event mechanism, covering the creation of custom ApplicationEvent classes, implementing listeners via ApplicationListener and @EventListener annotations, publishing events, using @Async for asynchronous handling, configuring custom event multicaster, and controlling listener execution order with @Order, complete with code examples.

AnnotationEventJava
0 likes · 9 min read
Mastering Spring Event Mechanism: Custom Events, Listeners, Async & Ordering
Architecture Digest
Architecture Digest
Oct 31, 2023 · Backend Development

Performance Troubleshooting and Optimization of a ToB System: From Low Throughput to Improved CPU Utilization

This article documents a step‑by‑step investigation of a Java Spring backend that initially achieved only 50 requests per second under load, detailing how slow SQL, excessive logging, thread‑pool misconfiguration, bean‑creation overhead and CPU‑bound operations were identified and mitigated to roughly double the throughput while reducing response latency.

JavaOptimizationProfiling
0 likes · 14 min read
Performance Troubleshooting and Optimization of a ToB System: From Low Throughput to Improved CPU Utilization
Sanyou's Java Diary
Sanyou's Java Diary
Oct 30, 2023 · Backend Development

Mastering API Retry Strategies in Java: 8 Proven Techniques

This article presents eight practical ways to implement retry mechanisms for third‑party API calls in Java, covering simple loops, recursion, built‑in HttpClient handlers, Spring Retry, Resilience4j, custom utilities, asynchronous thread‑pool retries, and message‑queue based retries, plus best‑practice guidelines.

HttpClientMessageQueueResilience4j
0 likes · 17 min read
Mastering API Retry Strategies in Java: 8 Proven Techniques
Selected Java Interview Questions
Selected Java Interview Questions
Oct 27, 2023 · Backend Development

Diagnosing and Optimizing Throughput and CPU Usage in a Java Spring Backend Service

The article details a step‑by‑step investigation of a Java Spring backend that initially achieved only 50 req/s under load, identifies bottlenecks such as slow SQL, excessive logging, thread‑pool misconfiguration and costly Spring bean creation, and demonstrates how targeted optimizations roughly doubled throughput while reducing response times.

CPUJavaOptimization
0 likes · 14 min read
Diagnosing and Optimizing Throughput and CPU Usage in a Java Spring Backend Service
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 25, 2023 · Backend Development

Mastering Spring WebClient: Non‑Blocking HTTP Calls in Spring Boot

This guide introduces Spring WebClient, a reactive, non‑blocking HTTP client for Spring Boot, compares it with RestTemplate, explains configuration options, demonstrates usage patterns, error handling, memory limits, Reactor Netty customization, request bodies, form data, and filter registration, providing practical code examples throughout.

HTTPJavaReactive
0 likes · 11 min read
Mastering Spring WebClient: Non‑Blocking HTTP Calls in Spring Boot
Selected Java Interview Questions
Selected Java Interview Questions
Oct 23, 2023 · Backend Development

Why RestTemplate Is Deprecated and How to Migrate to Spring WebClient

This article explains why Spring's RestTemplate has been deprecated, outlines the advantages of the non‑blocking WebClient, and provides detailed migration examples—including GET, POST, error handling, streaming, retries, custom configurations, and best‑practice guidelines for using WebClient in backend development.

Backend DevelopmentJavaReactive Programming
0 likes · 16 min read
Why RestTemplate Is Deprecated and How to Migrate to Spring WebClient
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 23, 2023 · Backend Development

Boost Spring Performance: AOP Logging, Caching, Thread Pools & DB Optimizations

This article presents practical Spring performance optimization techniques—including AOP‑based logging, second‑level caching with @Cacheable, reducing database queries via fetch strategies, employing thread‑pool executors, and general database query tuning—to improve application speed and resource efficiency.

AOPCachingDatabase
0 likes · 9 min read
Boost Spring Performance: AOP Logging, Caching, Thread Pools & DB Optimizations
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.

Dependency InjectionJavaobjectprovider
0 likes · 8 min read
Mastering Spring’s ObjectProvider: Flexible Dependency Injection Techniques
Java Architect Essentials
Java Architect Essentials
Oct 18, 2023 · Backend Development

Design and Implementation of a Reactive Download Library for Spring MVC/WebFlux

This article introduces a Java library that simplifies downloading various resources—files, HTTP URLs, or custom objects—by using a single @Download annotation, reactive programming, customizable handlers, source factories, concurrent loading, compression, and event‑driven logging to streamline complex download workflows in Spring MVC and WebFlux applications.

AnnotationDownloadJava
0 likes · 16 min read
Design and Implementation of a Reactive Download Library for Spring MVC/WebFlux
DeWu Technology
DeWu Technology
Oct 18, 2023 · Backend Development

Understanding Bean Validation and Spring Validation in Java Applications

Bean Validation (JSR‑303/380) offers a standard, annotation‑driven API—implemented by Hibernate Validator—for declaring constraints such as @NotNull or @Email, while Spring integrates it via @Valid and @Validated (with group support and AOP‑based method validation), enabling automatic request‑body checks, custom constraints, and service‑layer validation, provided the proper annotations are applied.

Bean ValidationJSR-303Validation
0 likes · 15 min read
Understanding Bean Validation and Spring Validation in Java Applications
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 ScopeDependency InjectionJava
0 likes · 12 min read
Master Spring Bean Injection: Prototype in Singleton, Lazy, Transactions & More
Cognitive Technology Team
Cognitive Technology Team
Oct 15, 2023 · Backend Development

How to Implement Pre‑warming in the Spring Ecosystem: Extension Points and Their Execution Order

Implementing pre‑warming in Spring involves using several extension points—SmartLifecycle, ApplicationListener for ContextRefreshedEvent, InitializingBean, @PostConstruct, ApplicationRunner, and CommandLineRunner—each with specific execution timing and ordering considerations to ensure cache loading occurs before the web server starts handling traffic.

ApplicationRunnerCacheSmartLifecycle
0 likes · 4 min read
How to Implement Pre‑warming in the Spring Ecosystem: Extension Points and Their Execution Order
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 13, 2023 · Fundamentals

Understanding Java Annotations and Custom Annotation Usage with Spring AOP

This article explains Java annotations, their purposes such as providing compiler metadata, generating code, runtime processing, and documentation, introduces built‑in and meta‑annotations, and demonstrates how to create and use custom annotations both via reflection and with Spring AOP for logging, including full code examples.

AOPBackendCustomAnnotation
0 likes · 7 min read
Understanding Java Annotations and Custom Annotation Usage with Spring AOP
Selected Java Interview Questions
Selected Java Interview Questions
Oct 12, 2023 · Backend Development

Spring Framework Utility Classes Overview: Assertions, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, StreamUtils, ReflectionUtils, AopUtils

This article provides a comprehensive overview of Spring Framework utility classes—including Assert, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, StreamUtils, ReflectionUtils, and AopUtils—explaining their purpose, key methods, and usage examples with code snippets for backend developers.

BackendIOJava
0 likes · 14 min read
Spring Framework Utility Classes Overview: Assertions, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, StreamUtils, ReflectionUtils, AopUtils
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 12, 2023 · Backend Development

Mastering Spring Transaction Timeouts: Configurations, Tests, and Internals

This article explains how to configure transaction timeout in Spring 5.3.23 using annotations and programmatic approaches, demonstrates four test scenarios with a large table, analyzes the resulting timeout exceptions, and delves into the underlying mechanisms in DataSourceTransactionManager, JdbcTemplate, and related utility classes.

DatabaseJavaspring
0 likes · 8 min read
Mastering Spring Transaction Timeouts: Configurations, Tests, and Internals
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.

BackendBean LifecycleDependency Injection
0 likes · 19 min read
Master 16 SpringBoot Extension Interfaces for Cleaner, More Elegant Code
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 8, 2023 · Backend Development

Spring Transaction Deep Dive: Thread‑Bound Connections and Multithreaded Consistency

This article explains Spring's transaction core, showing how TransactionInterceptor and TransactionAspectSupport use AOP to bind a Connection to ThreadLocal, walks through key code snippets for creating, committing, and rolling back transactions, and demonstrates a JUC‑based solution for maintaining transaction consistency across multiple threads.

JavaJdbcTemplateThreadLocal
0 likes · 9 min read
Spring Transaction Deep Dive: Thread‑Bound Connections and Multithreaded Consistency
Java Architect Essentials
Java Architect Essentials
Oct 6, 2023 · Backend Development

Implementing Order Workflow with Spring Statemachine and Persistent State Storage

This article explains the fundamentals of finite‑state machines, introduces Spring Statemachine, demonstrates how to model an order lifecycle, configure persistence with in‑memory and Redis stores, and provides complete Java code for enums, configuration, services, controllers, listeners, testing, and exception‑handling improvements.

AOPJavaPersistence
0 likes · 26 min read
Implementing Order Workflow with Spring Statemachine and Persistent State Storage
Code Ape Tech Column
Code Ape Tech Column
Oct 6, 2023 · Backend Development

Using Spring WebClient Instead of RestTemplate: Advantages and Code Examples

This article explains why RestTemplate is deprecated in Spring 5+, introduces the reactive WebClient as its replacement, outlines its advantages such as non‑blocking I/O and functional style, and provides detailed code examples for creating a client, performing synchronous and asynchronous requests, handling errors, and configuring timeouts.

Error handlingHTTPJava
0 likes · 10 min read
Using Spring WebClient Instead of RestTemplate: Advantages and Code Examples
Selected Java Interview Questions
Selected Java Interview Questions
Oct 2, 2023 · Backend Development

Understanding @Autowired Injection Issues and Alternative Approaches in Spring

This article explains the initialization order of Java classes, the pitfalls of using @Autowired for dependency injection, compares it with @Resource, and demonstrates setter, constructor, and Lombok-based injection methods with code examples to help avoid null‑pointer exceptions and improve coupling.

AutowiredBackendDependency Injection
0 likes · 6 min read
Understanding @Autowired Injection Issues and Alternative Approaches in Spring
政采云技术
政采云技术
Sep 28, 2023 · Backend Development

Common Scenarios Where Spring @Transactional Fails and How to Avoid Them

This article explains the fundamentals of database transactions, introduces Spring's @Transactional annotation, and enumerates nine typical situations—such as incorrect method visibility, final methods, self‑invocation, unmanaged beans, multithreading, wrong propagation, swallowed exceptions, unsupported exception types, and non‑transactional storage engines—where transactions may not work as expected, offering guidance to prevent these pitfalls.

@TransactionalAOPBackend
0 likes · 13 min read
Common Scenarios Where Spring @Transactional Fails and How to Avoid Them
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.

BackendDependency InjectionJava
0 likes · 15 min read
Comprehensive Guide to Spring MVC Annotations and Related Spring Annotations
Architect
Architect
Sep 25, 2023 · Backend Development

Using @Async in Spring: Default Thread Pools, Custom Thread Pools, and Best Practices

Spring's @Async annotation enables asynchronous method execution, but its default SimpleAsyncTaskExecutor creates a new thread per task, leading to resource issues; the article explains built‑in executors, their drawbacks, and how to implement custom thread pools via AsyncConfigurer, AsyncConfigurerSupport, or a custom TaskExecutor for better control.

Javaasyncconcurrency
0 likes · 8 min read
Using @Async in Spring: Default Thread Pools, Custom Thread Pools, and Best Practices
Java Architect Essentials
Java Architect Essentials
Sep 20, 2023 · Backend Development

Creating a Simple Demo with Spring 6 HTTP Interface

This article introduces Spring 6's new HTTP Interface feature, walks through building a Spring Boot demo with a User entity, a controller, an HTTP Interface annotated with @GetExchange, and a test using WebClient and HttpServiceProxyFactory, and explains related annotations and reactive dependencies.

BackendJavaReactive
0 likes · 7 min read
Creating a Simple Demo with Spring 6 HTTP Interface
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 InjectionDependency 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.

AutowiredDependency InjectionIDE Warning
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.

AutowiredDependency InjectionIDEA
0 likes · 6 min read
Why IDEA Warns About @Autowired but Ignores @Resource – Understanding Spring DI
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 16, 2023 · Backend Development

How Spring Initializes Parent and Child Containers via web.xml

This article explains how Spring 5.3.23 uses web.xml to configure a ContextLoaderListener that creates and refreshes the parent WebApplicationContext, and how DispatcherServlet initializes the child container, detailing the configuration parameters, default locations, and the refresh process.

ApplicationContextContextLoaderListenerDispatcherServlet
0 likes · 12 min read
How Spring Initializes Parent and Child Containers via web.xml
Architecture Digest
Architecture Digest
Sep 15, 2023 · Backend Development

Unified Exception Handling in Spring Boot Using @ControllerAdvice, Custom Assertions, and Enums

This article explains how to replace repetitive try‑catch blocks in Java Spring applications with a unified exception handling mechanism that leverages @ControllerAdvice, custom Assert utilities, enum‑based error codes, and standardized response objects to improve code readability, maintainability, and internationalization.

BackendEnumExceptionHandling
0 likes · 19 min read
Unified Exception Handling in Spring Boot Using @ControllerAdvice, Custom Assertions, and Enums
Top Architect
Top Architect
Sep 13, 2023 · Backend Development

Token Storage and Validation in Distributed Microservices Using Redis and Custom Annotations

This article explains how to generate, store, and validate login tokens across PC and mobile clients in a distributed microservice architecture, covering Redis storage, custom token entities, Spring service implementation, exception handling, client‑side storage utilities, and a custom annotation with an AOP aspect for request verification.

Microservicesaspect-orientedauthentication
0 likes · 17 min read
Token Storage and Validation in Distributed Microservices Using Redis and Custom Annotations
Architect
Architect
Sep 12, 2023 · Backend Development

Ensuring Transaction Consistency in Multi‑Threaded Spring Applications Using CompletableFuture and Programmatic Transactions

This article explains how to parallelize business steps with CompletableFuture, why Spring's @Async and @Transactional annotations cannot guarantee transaction consistency across threads, and presents a programmatic transaction approach—including copying Spring's transaction resources between threads—to achieve reliable multi‑threaded commits or rollbacks.

CompletableFutureJavaProgrammaticTransaction
0 likes · 19 min read
Ensuring Transaction Consistency in Multi‑Threaded Spring Applications Using CompletableFuture and Programmatic Transactions
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 12, 2023 · Backend Development

Mastering Spring’s ObjectFactory and FactoryBean: When and How to Use Them

This article explains the differences between Spring's ObjectFactory and FactoryBean interfaces, shows how they are applied in bean creation, servlet API injection, and custom implementations, and provides code examples and best‑practice tips for resolving bean ambiguities in a Spring backend.

Backend DevelopmentDependency InjectionJava
0 likes · 10 min read
Mastering Spring’s ObjectFactory and FactoryBean: When and How to Use Them
Sanyou's Java Diary
Sanyou's Java Diary
Sep 11, 2023 · Backend Development

Unveiling Spring’s 12 Core Startup Steps: A Deep Dive

This article walks through the twelve essential steps Spring performs during application startup, explaining each method—from prepareRefresh to finishRefresh—including bean factory preparation, post‑processor registration, and the final context refresh, all illustrated with diagrams and code snippets.

ApplicationContextBeanFactoryStartup
0 likes · 16 min read
Unveiling Spring’s 12 Core Startup Steps: A Deep Dive
Architecture Digest
Architecture Digest
Sep 7, 2023 · Backend Development

Design and Implementation of a Flexible Download Library for Spring MVC and WebFlux

This article explains how a Java download library uses a @Download annotation, reactive programming, handler chains, source abstractions, compression, and event logging to simplify downloading various resources—including files, HTTP URLs, and custom objects—while supporting both Spring MVC and WebFlux with concurrent processing and customizable pipelines.

DownloadJavaReactive
0 likes · 14 min read
Design and Implementation of a Flexible Download Library for Spring MVC and WebFlux
JD Cloud Developers
JD Cloud Developers
Aug 31, 2023 · Backend Development

Mastering Spring Transaction Management: From Basics to Advanced Scenarios

This article explains why transaction management is essential, how Spring abstracts resource handling, supports nested transactions and propagation behaviors, and compares declarative (annotation) and programmatic approaches, providing practical code examples and a deep dive into the underlying TransactionManager model.

Backend DevelopmentJavaTransaction Management
0 likes · 18 min read
Mastering Spring Transaction Management: From Basics to Advanced Scenarios
Architecture Digest
Architecture Digest
Aug 30, 2023 · Backend Development

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

This article provides a detailed exploration of Spring and Spring Boot's extensible interfaces, illustrating the complete bean lifecycle, presenting an invocation order diagram, and offering practical code examples for each extension point such as ApplicationContextInitializer, BeanFactoryPostProcessor, SmartInstantiationAwareBeanPostProcessor, and more, enabling developers to customize container behavior effectively.

Backend DevelopmentBean LifecycleJava
0 likes · 17 min read
Comprehensive Overview of Spring and Spring Boot Extension Points and Bean Lifecycle
Architect
Architect
Aug 29, 2023 · Fundamentals

Understanding AOP: From Joinpoint Design to Spring’s Dynamic Weaving

This article analyzes AOP’s origins, defines join points and cross‑cutting logic, designs interfaces based on the AOP Alliance specifications, and compares static versus dynamic weaving approaches, illustrating each step with Java code examples and diagrams to show how Spring implements AOP.

AOPDesign PatternsDynamic Weaving
0 likes · 10 min read
Understanding AOP: From Joinpoint Design to Spring’s Dynamic Weaving
Selected Java Interview Questions
Selected Java Interview Questions
Aug 28, 2023 · Backend Development

Concept-Download: A Backend Library for Simplified File Download in Spring

This article introduces the Concept-Download library, explains how a single @Download annotation can handle various download sources—including files, HTTP URLs, and custom objects—by leveraging reactive programming, handler chains, source factories, concurrent loading, compression, and unified response writing for both Spring MVC and WebFlux.

Backend DevelopmentFile DownloadJava
0 likes · 16 min read
Concept-Download: A Backend Library for Simplified File Download in Spring
Ximalaya Technology Team
Ximalaya Technology Team
Aug 28, 2023 · Backend Development

Mastering Spring Events: Definition, Benefits, Usage, and Deep Source‑Code Walkthrough

Spring Event provides a decoupled, extensible mechanism for publishing and handling application events in Spring, covering its definition, benefits, drawbacks, practical usage with code examples, core internal classes, reserved events, asynchronous processing options, and detailed source‑code analysis of the event multicaster and listener registration.

ApplicationContextBackendEvent
0 likes · 20 min read
Mastering Spring Events: Definition, Benefits, Usage, and Deep Source‑Code Walkthrough
Architect's Tech Stack
Architect's Tech Stack
Aug 26, 2023 · Backend Development

Getting Started with Spring 6 HTTP Interface: A Complete Demo

This article introduces Spring Framework 6's new HTTP Interface feature, walks through creating a simple Spring Boot service, defining a Java interface for HTTP calls, testing it with WebClient and HttpServiceProxyFactory, and explains related annotations and dependencies.

JavaWebClienthttp-interface
0 likes · 7 min read
Getting Started with Spring 6 HTTP Interface: A Complete Demo
Su San Talks Tech
Su San Talks Tech
Aug 24, 2023 · Backend Development

Simplify JWT Token Handling in Spring Using Custom Annotations & ThreadLocal

This article walks through the evolution of a Spring‑based JWT token validation solution, from passing HttpServletRequest into service methods to using a custom @NeedToken annotation, reflection, a base class, and finally ThreadLocal to ensure each request’s token is safely isolated in high‑concurrency environments.

AOPJWTJava
0 likes · 13 min read
Simplify JWT Token Handling in Spring Using Custom Annotations & ThreadLocal
Architecture Digest
Architecture Digest
Aug 22, 2023 · Backend Development

Introduction to Spring WebFlux and Reactive Programming

This article introduces Spring WebFlux as a reactive, non‑blocking web framework built on Reactor, explains the concepts of reactive programming, compares it with traditional Spring MVC, and provides practical code examples for building and running a WebFlux application with Spring Boot.

APIBackendJava
0 likes · 8 min read
Introduction to Spring WebFlux and Reactive Programming
Selected Java Interview Questions
Selected Java Interview Questions
Aug 22, 2023 · Backend Development

Optimizing Startup Time of an Old Dubbo Service Using JProfile and Configuration Tweaks

This article details how a legacy Dubbo service built on Spring 3.2.x with many integrated components suffered a ten‑minute startup, and how using JProfile to pinpoint costly reflection checks, disabling unnecessary Spring annotations, and fixing RabbitMQ connection issues reduced the deployment time to under two minutes.

BackendJProfileJava
0 likes · 8 min read
Optimizing Startup Time of an Old Dubbo Service Using JProfile and Configuration Tweaks