Tagged articles

spring

1810 articles · Page 6 of 19
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 25, 2024 · Backend Development

Master Spring Cloud Gateway: Routing, Metrics, Filters & Debugging Tips

This guide walks through Spring Cloud Gateway features—including marking exchanges as routed, enabling route metrics, configuring metadata, accessing Reactor Netty logs, troubleshooting with debug logging, disabling automatic route refresh, ordering global filters, using Actuator sub‑paths, and rewriting request parameters—complete with code snippets and configuration examples.

FiltersRoutingdebugging
0 likes · 8 min read
Master Spring Cloud Gateway: Routing, Metrics, Filters & Debugging Tips
Code Ape Tech Column
Code Ape Tech Column
Jul 24, 2024 · Backend Development

Understanding and Implementing Java SPI and Spring SPI

This article explains Java's built‑in Service Provider Interface (SPI) mechanism, demonstrates how to create interfaces, implementations, and configuration files, shows testing with ServiceLoader, and compares it to Spring's SPI implementation using spring.factories, including code examples and analysis of their advantages and limitations.

SPIServiceLoaderbackend
0 likes · 7 min read
Understanding and Implementing Java SPI and Spring SPI
DaTaobao Tech
DaTaobao Tech
Jul 22, 2024 · Backend Development

Spring Bean Injection Issues and Dependency Injection Priorities

In a project with two applications, a Tair bean defined via JavaConfig works in one app but fails in the other because Spring’s injection rules prioritize type over name, causing ambiguity; using explicit bean naming with XML, adding @Qualifier, or switching to @Resource resolves the issue.

Bean ConfigurationDependency Injectionannotations
0 likes · 12 min read
Spring Bean Injection Issues and Dependency Injection Priorities
Su San Talks Tech
Su San Talks Tech
Jul 21, 2024 · Backend Development

8 Effective Retry Strategies for Java APIs

This article presents eight practical retry mechanisms for Java applications—including loop, recursion, HttpClient configuration, Spring Retry, Resilience4j, custom utilities, asynchronous thread‑pool retries, and message‑queue based retries—along with code examples, configuration snippets, and best‑practice guidelines to help developers handle transient network failures reliably.

Best PracticesConcurrencyHttpClient
0 likes · 17 min read
8 Effective Retry Strategies for Java APIs
Top Architect
Top Architect
Jul 20, 2024 · Backend Development

Spring Framework Utility Classes Overview and Usage

This article presents a comprehensive guide to Spring's core utility classes—including Assert, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, StreamUtils, ReflectionUtils, and AopUtils—showing their purpose, typical use‑cases, and code examples, while also containing promotional material for related services.

CodeExamplesReflectionjava
0 likes · 13 min read
Spring Framework Utility Classes Overview and Usage
Architect's Guide
Architect's Guide
Jul 20, 2024 · Backend Development

Spring Controller Scope: Singleton vs Prototype and Concurrency Safety

The article explains that Spring MVC controllers are singleton by default, which makes mutable instance fields unsafe for concurrent requests, demonstrates the issue with sample code, and shows how applying @Scope("prototype") or using ThreadLocal resolves the thread‑safety problem.

ConcurrencyPrototypeSingleton
0 likes · 4 min read
Spring Controller Scope: Singleton vs Prototype and Concurrency Safety
Architect
Architect
Jul 16, 2024 · Backend Development

Design and Implementation of a FIFO Export Queue for Large Data Exports in Java

This article explains how to handle massive MySQL export operations by introducing a fixed‑size FIFO queue, detailing the Java classes ExportQueue, AbstractExport, and ExportImpl, and showing a test controller that demonstrates queue limits, concurrency handling, and future considerations.

ConcurrencyExport QueueFIFO
0 likes · 11 min read
Design and Implementation of a FIFO Export Queue for Large Data Exports in Java
Java Backend Technology
Java Backend Technology
Jul 12, 2024 · Backend Development

Designing a Clean API Response Wrapper in Java Spring

This article explains how to standardize API responses in a micro‑service architecture by defining a JSON result format with code, message, and data fields, using HTTP‑like status code ranges, and automatically wrapping controller outputs with a custom @ResponseResult annotation and Spring's ResponseBodyAdvice.

APIannotationsjava
0 likes · 8 min read
Designing a Clean API Response Wrapper in Java Spring
Programmer DD
Programmer DD
Jul 12, 2024 · Backend Development

What’s New in VS Code for Java June 2024? Project Settings, Spring & Gradle Updates

The June 2024 VS Code for Java update introduces enhanced project settings with new compiler, Maven, and formatter tabs, easier access via the status bar, test coverage improvements, Gradle Build Server projects, Spring feature upgrades including @DependsOn support and Spring Boot 3.3 compatibility, and new extension packs for Java development.

Extension PackMavenVS Code
0 likes · 8 min read
What’s New in VS Code for Java June 2024? Project Settings, Spring & Gradle Updates
Architect's Guide
Architect's Guide
Jul 11, 2024 · Backend Development

Using Spring Transaction Hooks to Send Kafka Messages After Commit

This article demonstrates how to leverage Spring's TransactionSynchronizationManager to detect active transactions and register synchronization callbacks that asynchronously push payment‑ledger messages to Kafka only after the transaction successfully commits, ensuring data consistency and minimal impact on the main business flow.

KafkaTransactionTransactionSynchronizationManager
0 likes · 9 min read
Using Spring Transaction Hooks to Send Kafka Messages After Commit
Architecture Digest
Architecture Digest
Jul 9, 2024 · Backend Development

Designing a Unified API Response Structure for Backend Services

This article explains how to design a unified API response format for backend services, covering JSON structure, status code conventions, message handling, data payload, a Result wrapper class, controller simplifications, custom annotations, interceptors, and global exception handling to achieve clean and maintainable code.

StatusCodebackenddesign
0 likes · 7 min read
Designing a Unified API Response Structure for Backend Services
Top Architect
Top Architect
Jul 7, 2024 · Backend Development

Backend Request Debounce and Distributed Lock Implementation in Java

This article explains the concept of request debouncing, outlines ideal debounce component characteristics, identifies which API endpoints need debouncing, and provides detailed Java implementations using shared Redis cache and Redisson distributed locks, including custom annotations, key generation, and practical testing results.

AnnotationDistributed LockRedis
0 likes · 18 min read
Backend Request Debounce and Distributed Lock Implementation in Java
Architecture Digest
Architecture Digest
Jul 7, 2024 · Backend Development

Hot Deployment of Custom Interface Implementations in Java Using Reflection and Spring

This article demonstrates how to define a simple Calculator interface, provide both annotation‑based and reflection‑based implementations, and dynamically hot‑deploy user‑supplied JAR files by loading them with URLClassLoader, registering Spring beans, and handling bean removal on JAR deletion.

Backend DevelopmentHot DeploymentJAR Loading
0 likes · 8 min read
Hot Deployment of Custom Interface Implementations in Java Using Reflection and Spring
Architect's Guide
Architect's Guide
Jul 3, 2024 · Backend Development

Hot‑Pluggable AOP Implementation in Spring: Dynamically Managing Advice

This article demonstrates how to implement hot‑pluggable AOP in Spring by allowing users to dynamically add or remove advice at runtime, covering prerequisite concepts, core logic, complete code examples, and test scenarios that show logging activation and deactivation without restarting the application.

AOPAdviceDynamic Plugin
0 likes · 9 min read
Hot‑Pluggable AOP Implementation in Spring: Dynamically Managing Advice
IT Architects Alliance
IT Architects Alliance
Jul 2, 2024 · Backend Development

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

This article examines whether defining separate interfaces for Service and DAO layers is necessary in Spring projects, debunks common justifications, proposes a bottom‑up development workflow, and outlines project structures for single and multiple implementations, highlighting both benefits and drawbacks.

Dependency Injectionbackend-architecturedao
0 likes · 8 min read
Do You Really Need Interfaces for Service and DAO Layers in Spring?
Top Architect
Top Architect
Jul 2, 2024 · Backend Development

Cache Preheating in Spring: Abstract Cache, Context Utility, and Implementation

This article explains the concept of cache preheating, provides an abstract cache class, a Spring ApplicationContext utility, a CommandLineRunner handler to load hot data at startup, and demonstrates a concrete NewsCache implementation with Redis integration, followed by a REST endpoint to access the cached data.

AbstractCacheCommandLineRunnerRedis
0 likes · 8 min read
Cache Preheating in Spring: Abstract Cache, Context Utility, and Implementation
Su San Talks Tech
Su San Talks Tech
Jun 30, 2024 · Backend Development

How to Ensure Transaction Rollback Across Asynchronous Threads in Spring

This article explains how to guarantee that when any asynchronous thread fails during a large Excel import, the main thread can roll back all related transactions, covering the limitations of @Transactional and @Async, thread‑local propagation, and practical solutions using Future, CompletableFuture, custom ForkJoinPool, and manual transaction management.

Excel ImportTransaction Managementasynchronous programming
0 likes · 20 min read
How to Ensure Transaction Rollback Across Asynchronous Threads in Spring
Architect
Architect
Jun 28, 2024 · Backend Development

Do Service and DAO Layers Really Need Interfaces? A Practical Spring Analysis

This article examines whether defining interfaces for Service and DAO layers is necessary in Spring projects, debunks common arguments for interfaces, proposes a top‑down coding workflow, and outlines strategies for handling multiple implementations without adding unnecessary abstraction.

Backend DevelopmentDependency Injectiondao
0 likes · 9 min read
Do Service and DAO Layers Really Need Interfaces? A Practical Spring Analysis
Top Architect
Top Architect
Jun 28, 2024 · Backend Development

Designing a Unified API Response Structure for Backend Services

This article explains how to create a consistent JSON response format with status codes, messages, and data payloads, and how to automate its generation in Java Spring using a custom @ResponseResult annotation, interceptor, and controller advice to simplify backend development and improve front‑end integration.

APIAnnotationError handling
0 likes · 9 min read
Designing a Unified API Response Structure for Backend Services
DaTaobao Tech
DaTaobao Tech
Jun 26, 2024 · Backend Development

Using MapStruct for Efficient Java Bean Mapping

MapStruct is a compile‑time Java bean‑mapping generator that, when added as an annotation processor in Maven, Gradle or an IDE, lets developers define @Mapper interfaces to automatically produce type‑safe, high‑performance implementations—including custom field mappings, nested collections, and lifecycle hooks—thereby eliminating boilerplate code and centralizing mapping logic.

Annotation ProcessorObject Mappingjava
0 likes · 17 min read
Using MapStruct for Efficient Java Bean Mapping
Architect
Architect
Jun 25, 2024 · Backend Development

Mastering Spring Transaction Hooks: Send Kafka Messages Only After Commit

This article explains how to use Spring's TransactionSynchronizationManager to detect active transactions and register callbacks that asynchronously send Kafka messages after a transaction successfully commits, ensuring data consistency in payment‑system archiving scenarios.

KafkaSpringBootTransaction
0 likes · 10 min read
Mastering Spring Transaction Hooks: Send Kafka Messages Only After Commit
Top Architect
Top Architect
Jun 25, 2024 · Backend Development

A Comprehensive Guide to Spring Boot Startup Sequence and Extension Points

This article explains the Spring Boot startup process, enumerates the key extension points and their execution order, demonstrates the sequence with practical code examples, and answers common questions about bean initialization, lifecycle callbacks, and the proper timing for opening RPC, MQ, and HTTP traffic.

BeanExtensionPointsLifecycle
0 likes · 16 min read
A Comprehensive Guide to Spring Boot Startup Sequence and Extension Points
Code Ape Tech Column
Code Ape Tech Column
Jun 25, 2024 · Backend Development

COLA Stateless State Machine: A Lightweight, Thread‑Safe Alternative to Spring StateMachine for Java Backend Order Processing

The article explains why Spring StateMachine is heavyweight and thread‑unsafe for high‑concurrency order management, introduces the open‑source COLA stateless state machine as a simpler, lock‑free solution, and provides detailed design principles, core concepts, and extensive Java code examples.

COLAState Machinejava
0 likes · 13 min read
COLA Stateless State Machine: A Lightweight, Thread‑Safe Alternative to Spring StateMachine for Java Backend Order Processing
Code Ape Tech Column
Code Ape Tech Column
Jun 24, 2024 · Backend Development

Applying the Service Locator Pattern in Spring to Decouple File Parsers

The article explains how to replace tightly‑coupled if‑else or switch statements for selecting CSV, JSON, or XML parsers with a Service Locator Pattern in Spring, showing step‑by‑step code examples, configuration, and the resulting adherence to the open‑closed principle.

Dependency InjectionFactory BeanService Locator
0 likes · 8 min read
Applying the Service Locator Pattern in Spring to Decouple File Parsers
Architect's Tech Stack
Architect's Tech Stack
Jun 24, 2024 · Backend Development

Implementing a FIFO Export Queue for Large‑Scale Data Export in Java

This article explains how to design and implement a fixed-size FIFO export queue in Java to manage large‑scale MySQL data exports, detailing the ExportQueue class, abstract export logic with EasyExcel, a concrete ExportImpl service, and a test controller, while discussing performance considerations and future enhancements.

EasyExcelExportQueue
0 likes · 11 min read
Implementing a FIFO Export Queue for Large‑Scale Data Export in Java
Top Architect
Top Architect
Jun 22, 2024 · Backend Development

Understanding Idempotency and Its Implementation with Custom Annotations in Java

This article explains the concept of idempotency, identifies which HTTP requests are naturally idempotent, discusses why idempotency is essential for retries, async callbacks, and message queues, and demonstrates a practical Java implementation using custom annotations, AOP, and Redis for token management.

AOPRedisannotations
0 likes · 11 min read
Understanding Idempotency and Its Implementation with Custom Annotations in Java
Su San Talks Tech
Su San Talks Tech
Jun 22, 2024 · Backend Development

How to Speed Up Excel-to-Database Imports with Async and Thread‑Pool Tuning in Java

This article explains the common slow approach of reading Excel files with POI and inserting rows via JDBC, then presents three practical optimizations—caching data, using asynchronous multithreaded reads, and per‑file async processing—along with thread‑pool configuration tips and EasyExcel examples to dramatically reduce import time from minutes to seconds.

AsyncDatabaseExcel
0 likes · 17 min read
How to Speed Up Excel-to-Database Imports with Async and Thread‑Pool Tuning in Java
Top Architect
Top Architect
Jun 21, 2024 · Backend Development

Deep Dive into Spring Boot Startup Sequence and Extension Points

This article provides a comprehensive explanation of Spring Boot's startup process, detailing each lifecycle extension point, the order of execution, common pitfalls with RPC/MQ/HTTP traffic, and includes runnable code examples to help developers master Spring initialization.

DependencyInjectionLifecycleSpringBoot
0 likes · 15 min read
Deep Dive into Spring Boot Startup Sequence and Extension Points
Top Architect
Top Architect
Jun 14, 2024 · Backend Development

Comprehensive Guide to Spring MVC, Bean, and Boot Annotations

This article provides a detailed overview of Spring MVC request‑mapping annotations, Spring Bean stereotypes, dependency‑injection and scope annotations, as well as Spring Boot conditional and lifecycle annotations, complete with code examples and usage tips for Java backend development.

Spring Bootannotationsjava
0 likes · 16 min read
Comprehensive Guide to Spring MVC, Bean, and Boot Annotations
IT Architects Alliance
IT Architects Alliance
Jun 14, 2024 · Backend Development

In‑Depth Explanation of Spring Boot Startup Sequence and Extension Points

This article thoroughly explains the Spring Boot startup sequence, detailing each lifecycle extension point, common pitfalls with early RPC, HTTP, and MQ traffic, and provides code examples and answers to eleven critical questions to help developers master Spring initialization and avoid runtime failures.

DependencyInjectionLifecyclejava
0 likes · 13 min read
In‑Depth Explanation of Spring Boot Startup Sequence and Extension Points
Java Tech Enthusiast
Java Tech Enthusiast
Jun 12, 2024 · Backend Development

Understanding Dependency Injection Types in Spring: Constructor, Setter, and Field Injection

The article explains Spring’s three dependency‑injection styles—constructor, setter, and field—showing how constructor injection (often with @Autowired or implicit) enables immutable, required dependencies, setter injection handles optional ones, and field injection, though concise, is discouraged due to immutability, testability, and coupling drawbacks.

Constructor InjectionDependency InjectionField Injection
0 likes · 7 min read
Understanding Dependency Injection Types in Spring: Constructor, Setter, and Field Injection
Top Architect
Top Architect
Jun 11, 2024 · Backend Development

Dynamic Class Loading, Registration, and Unloading for Data Governance Tasks in a Spring‑XXL‑Job Service

This article explains how to design a plug‑in architecture for a data‑governance service by using a custom URLClassLoader, Spring bean registration, and XXL‑Job integration to dynamically load, start, stop, upgrade, and unload individual governance tasks without restarting the whole service, and also shows how to persist the configuration in local YAML or Nacos.

DynamicLoadingXxl-Jobclassloader
0 likes · 22 min read
Dynamic Class Loading, Registration, and Unloading for Data Governance Tasks in a Spring‑XXL‑Job Service
Java Architect Essentials
Java Architect Essentials
Jun 10, 2024 · Backend Development

Designing an Excellent Controller Layer in Java Spring

This article explains how to build a clean, maintainable Controller layer in Java Spring by separating responsibilities, using unified response structures, applying ResponseBodyAdvice for automatic wrapping, implementing parameter validation with JSR‑303, and handling custom exceptions through centralized advice, illustrated with comprehensive code examples.

ControllerExceptionHandlingResponseBodyAdvice
0 likes · 15 min read
Designing an Excellent Controller Layer in Java Spring
Top Architect
Top Architect
Jun 4, 2024 · Backend Development

Dynamic Hot‑Pluggable AOP Implementation in Spring

This article explains how to let users dynamically enable or disable logging by managing Spring AOP advice at runtime, covering prerequisite concepts, core hot‑plug logic, detailed Java code for installing and removing plugins, a step‑by‑step demo, and a concise summary of the approach.

AOPDynamic PluginHot Plug
0 likes · 12 min read
Dynamic Hot‑Pluggable AOP Implementation in Spring
Architecture Digest
Architecture Digest
Jun 3, 2024 · Backend Development

Spring Statemachine for Order State Management with Persistence, Exception Handling, and AOP Logging

This article explains the fundamentals of finite state machines, introduces Spring Statemachine, demonstrates how to model order lifecycle states, configure persistence with memory and Redis, handle exceptions during state transitions, and use AOP to log transition results, providing complete Java code examples.

AOPPersistenceState Machine
0 likes · 23 min read
Spring Statemachine for Order State Management with Persistence, Exception Handling, and AOP Logging
Java High-Performance Architecture
Java High-Performance Architecture
May 30, 2024 · Backend Development

How to Build a Clean, Robust Java Controller Layer with Unified Responses and Validation

This article explains how to design an effective Java controller layer by separating concerns, introducing a unified response structure, applying global response wrapping, leveraging Spring's validation mechanisms, and handling custom exceptions to produce concise, maintainable backend code.

Backend DevelopmentControllerValidation
0 likes · 18 min read
How to Build a Clean, Robust Java Controller Layer with Unified Responses and Validation
JD Cloud Developers
JD Cloud Developers
May 28, 2024 · Backend Development

Mastering Ehcache: A Deep Dive into Java Local Caching Strategies

This article introduces Ehcache, an open‑source Java local‑cache framework, explains its layered storage options, flexible expiration policies, eviction strategies, and provides comprehensive code examples for configuring in‑memory, off‑heap, and disk‑persistent caches, along with practical usage tips and performance considerations.

Cache PersistenceCachingEhcache
0 likes · 15 min read
Mastering Ehcache: A Deep Dive into Java Local Caching Strategies
Top Architect
Top Architect
May 25, 2024 · Backend Development

Java Backend Token Generation Using JWT: Implementation and Usage Guide

This article explains how to prevent duplicate form submissions in Java web applications by generating and validating JWT tokens on the backend, provides complete utility classes and controller examples, and includes step‑by‑step usage instructions with full source code.

JWTTokenjava
0 likes · 16 min read
Java Backend Token Generation Using JWT: Implementation and Usage Guide
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 25, 2024 · Backend Development

Understanding Spring's IoC Container: BeanFactory, ListableBeanFactory, HierarchicalBeanFactory, and AutowireCapableBeanFactory

This article explains the core Spring IoC concepts by analyzing the top‑level BeanFactory interface and its three important sub‑interfaces—HierarchicalBeanFactory, ListableBeanFactory, and AutowireCapableBeanFactory—illustrating their responsibilities, inheritance relationships, and practical usage with code examples.

Backend DevelopmentBeanFactoryDependency Injection
0 likes · 8 min read
Understanding Spring's IoC Container: BeanFactory, ListableBeanFactory, HierarchicalBeanFactory, and AutowireCapableBeanFactory
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 22, 2024 · Backend Development

How to Validate SpringBoot Configuration at Startup to Prevent Runtime Errors

This guide explains why validating configuration properties in SpringBoot 2.7 is essential, outlines the benefits such as increased robustness and faster debugging, and provides a step‑by‑step example with code snippets showing how to use @ConfigurationProperties, @Validated, and BeanPostProcessor for automatic validation at application startup.

Configuration Validationbackendjava
0 likes · 7 min read
How to Validate SpringBoot Configuration at Startup to Prevent Runtime Errors
Architect
Architect
May 15, 2024 · Backend Development

Hot‑Pluggable AOP in Spring: Dynamically Adding and Removing Advice

This article demonstrates how to implement a hot‑pluggable AOP solution in Spring by exposing endpoints that let users dynamically add or remove Advice, covering the underlying concepts, core implementation code, a demo service, and test scenarios that show logging being enabled and disabled at runtime.

AOPDynamicAdviceHotPluggable
0 likes · 10 min read
Hot‑Pluggable AOP in Spring: Dynamically Adding and Removing Advice
Code Ape Tech Column
Code Ape Tech Column
May 14, 2024 · Backend Development

Comprehensive Guide to Spring State Machine: Concepts, Implementation, Persistence, and Troubleshooting

This article explains the fundamentals of finite‑state machines, introduces Spring Statemachine’s core features, walks through a complete Java implementation with database schema, persistence (memory and Redis), REST APIs, exception handling, and an AOP‑based solution for reliable state transitions.

AOPPersistenceRedis
0 likes · 25 min read
Comprehensive Guide to Spring State Machine: Concepts, Implementation, Persistence, and Troubleshooting
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
May 12, 2024 · Backend Development

Master Spring Global Exception & Data Handling with @ControllerAdvice

Learn how to use Spring's @ControllerAdvice, @ExceptionHandler, @InitBinder, and @ModelAttribute annotations to implement global exception handling, data binding, and pre-processing, including custom exceptions, order control with @Order, and practical code examples for robust backend development.

@ControllerAdviceDataBindingExceptionHandling
0 likes · 12 min read
Master Spring Global Exception & Data Handling with @ControllerAdvice
macrozheng
macrozheng
May 11, 2024 · Backend Development

When Does @Transactional Commit? Before or After Unlock?

This article explains the timing of Spring's @Transactional commit relative to lock release, analyzes why committing after unlock can cause overselling, shows how to trace the transaction lifecycle in the source code, and offers practical solutions to ensure atomicity in high‑concurrency scenarios.

ConcurrencyDatabaseLock
0 likes · 19 min read
When Does @Transactional Commit? Before or After Unlock?
Top Architect
Top Architect
May 9, 2024 · Backend Development

Hot Deployment of User‑Implemented Java Interfaces Using Reflection and Spring

This article demonstrates how to design a simple Calculator interface in Java, implement it using both Spring‑managed and reflection‑based approaches, and achieve hot deployment by loading user‑provided JAR files at runtime, including code for class loading, bean registration, and cleanup.

Hot DeploymentReflectiondynamic loading
0 likes · 12 min read
Hot Deployment of User‑Implemented Java Interfaces Using Reflection and Spring
macrozheng
macrozheng
May 8, 2024 · Backend Development

Mastering Spring’s @Autowired: Advanced Usage, Qualifiers, and Common Pitfalls

This article explores the default behavior of Spring's @Autowired annotation, how to resolve bean name conflicts, use @Qualifier and @Primary, apply @Autowired on constructors, methods, parameters, and collections, and troubleshoot common issues such as missing annotations, filter injection, component scanning, and circular dependencies.

AutowiredDependency InjectionSpring Boot
0 likes · 15 min read
Mastering Spring’s @Autowired: Advanced Usage, Qualifiers, and Common Pitfalls
JavaEdge
JavaEdge
May 7, 2024 · Backend Development

Mastering Product Management: Build SPU/SKU CRUD with Snowflake IDs in Java

This guide walks through implementing a complete product management module in a Java e‑commerce system, covering Snowflake distributed ID generation, database schema design for SPU and SKU tables, CRUD operations, category‑brand linking, audit workflow, status toggling, batch processing, and logical deletion, all with concrete code examples.

CRUDMySQLSnowflake
0 likes · 16 min read
Mastering Product Management: Build SPU/SKU CRUD with Snowflake IDs in Java
Su San Talks Tech
Su San Talks Tech
May 7, 2024 · Backend Development

9 Common Reasons Why @Async Doesn’t Work in Spring and How to Fix Them

This article explains nine typical scenarios that cause the Spring @Async annotation to fail—ranging from missing @EnableAsync to improper method visibility, return types, static or final modifiers, missing @Service, manual object creation, and incorrect component scanning—providing clear explanations and code examples for each case.

AOPAsyncSpring Boot
0 likes · 10 min read
9 Common Reasons Why @Async Doesn’t Work in Spring and How to Fix Them
Top Architect
Top Architect
May 6, 2024 · Operations

Graceful Service Shutdown and Deployment Strategies for Java Applications

This article explains how to achieve graceful service startup and shutdown in Java projects, covering monolithic and microservice architectures, Spring and SpringBoot mechanisms, service registration with Eureka and Nacos, Kubernetes probes, thread‑pool and MQ graceful termination, and provides practical code examples for each scenario.

Graceful ShutdownKubernetesjava
0 likes · 27 min read
Graceful Service Shutdown and Deployment Strategies for Java Applications
Java Captain
Java Captain
May 4, 2024 · Backend Development

Implementing a FIFO Export Queue for Large Data Exports in Java

This article explains how to design and implement a fixed‑size FIFO export queue in a Java Spring application to control concurrent MySQL data exports, detailing the related entities, code implementation with EasyExcel, a test controller, and observed results.

ConcurrencyEasyExcelExport Queue
0 likes · 10 min read
Implementing a FIFO Export Queue for Large Data Exports in Java
Java Tech Enthusiast
Java Tech Enthusiast
May 2, 2024 · Backend Development

Why IDEA Warns on @Autowired but Not on @Resource: A Spring DI Overview

IDEA flags @Autowired field injection but not @Resource because Spring advises against field injection—seeing it as tightly coupled and hard to test—while @Resource is a standard JSR‑250 annotation, so the IDE applies the warning only to the Spring‑specific @Autowired usage.

AutowiredDependency InjectionIDEA
0 likes · 5 min read
Why IDEA Warns on @Autowired but Not on @Resource: A Spring DI Overview
Programmer XiaoFu
Programmer XiaoFu
Apr 30, 2024 · Backend Development

Lombok Tricks: Using @onX, @Delegate, @Cleanup, @Singular/@Builder, and @With

This article showcases several handy Lombok annotations—@onX for custom constructor injection, @Delegate for method delegation, @Cleanup for automatic resource release, the @Singular/@Builder combo for fluent object creation, and @With for immutable copies—illustrating their usage with Spring and Java code examples while warning against overuse.

Lombokannotationscode generation
0 likes · 7 min read
Lombok Tricks: Using @onX, @Delegate, @Cleanup, @Singular/@Builder, and @With
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Apr 30, 2024 · Backend Development

Mastering Spring AOP: XML, Annotations, and ProxyFactoryBean Deep Dive

This article explains Spring AOP fundamentals, demonstrates XML‑based and annotation‑based configurations, and provides a comprehensive guide to using ProxyFactoryBean—including its properties, proxy‑interface and proxy‑class scenarios, CGLIB considerations, and wildcard interceptor matching—complete with runnable code examples.

AOPCGLIBProxyFactoryBean
0 likes · 9 min read
Mastering Spring AOP: XML, Annotations, and ProxyFactoryBean Deep Dive
Selected Java Interview Questions
Selected Java Interview Questions
Apr 29, 2024 · Backend Development

Why Spring BeanUtils.copyProperties Is Discouraged and MapStruct Is Preferred for Java Object Mapping

The article explains the limitations of Spring's BeanUtils.copyProperties—such as type mismatches, null overwriting, and reflection overhead—and demonstrates how MapStruct provides a faster, compile‑time generated alternative for copying properties between Java objects, with usage examples and Maven setup.

BeanUtilsObject MappingPerformance
0 likes · 6 min read
Why Spring BeanUtils.copyProperties Is Discouraged and MapStruct Is Preferred for Java Object Mapping
DaTaobao Tech
DaTaobao Tech
Apr 29, 2024 · Backend Development

Refactoring Cache Logic with Spring Cache Annotations

The article explains how moving cache operations out of business code and into Spring Cache annotations—@Cacheable, @CachePut, and @CacheEvict—creates a clean, loosely‑coupled design, simplifies maintenance, and enables custom extensions such as breakdown protection and multi‑level caching for high‑concurrency applications.

AOPjavaspring
0 likes · 6 min read
Refactoring Cache Logic with Spring Cache Annotations
Code Ape Tech Column
Code Ape Tech Column
Apr 29, 2024 · Backend Development

Advanced Lombok Annotations: @onX, @Delegate, @Cleanup, @Builder/@Singular, and @With

This article explains several powerful Lombok annotations—including @onX, @Delegate, @Cleanup, @Builder with @Singular, and @With—showing how they simplify Spring‑based Java code through automatic constructor generation, method delegation, resource management, and fluent builders, while also warning against overuse.

Dependency InjectionLombokannotations
0 likes · 7 min read
Advanced Lombok Annotations: @onX, @Delegate, @Cleanup, @Builder/@Singular, and @With
Architect
Architect
Apr 28, 2024 · Backend Development

Understanding Spring's Circular Dependency Resolution with a Three‑Level Cache

This article explains how Spring solves circular dependencies by using a three‑level cache system, walks through the underlying source‑code execution flow, clarifies the purpose of each cache level, and discusses why the design is essential for AOP‑enabled beans.

AOPBackend DevelopmentBeanFactory
0 likes · 12 min read
Understanding Spring's Circular Dependency Resolution with a Three‑Level Cache
Cognitive Technology Team
Cognitive Technology Team
Apr 27, 2024 · Backend Development

Using @Transactional and @Async Together in Spring: Interaction, Transaction Propagation, and Best Practices

This article explains how Spring's @Transactional and @Async annotations can be applied to the same service methods, the implications for transaction boundaries across threads, and the precautions developers must take to maintain data consistency and proper transaction management.

@TransactionalThreadLocalTransaction Management
0 likes · 4 min read
Using @Transactional and @Async Together in Spring: Interaction, Transaction Propagation, and Best Practices
Code Ape Tech Column
Code Ape Tech Column
Apr 27, 2024 · Backend Development

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

This article examines whether every Service and DAO class in a Spring‑based backend should implement an interface, discusses the three traditional reasons for using interfaces, explains why they often do not hold up, and proposes practical structuring alternatives for single‑ and multi‑implementation scenarios.

Dependency Injectiondaointerface
0 likes · 8 min read
Do Service and DAO Layers Need Interfaces? When to Use Them in Spring Projects
DeWu Technology
DeWu Technology
Apr 24, 2024 · Backend Development

State Machine Integration for New Product Onboarding

The article details how Dewu’s new product onboarding workflow was refactored into a Spring StateMachine‑driven architecture that separates channel‑specific logic via a Strategy‑pattern operation layer, defines clear enum status domains, and uses guards, actions, and choice states to achieve maintainable, extensible, and idempotent state transitions.

Design PatternsState Machineproduct onboarding
0 likes · 20 min read
State Machine Integration for New Product Onboarding
Su San Talks Tech
Su San Talks Tech
Apr 24, 2024 · Backend Development

Master Spring’s Core Features: Resource Management, Environment, Type Conversion and More

This article provides a comprehensive guide to Spring’s essential infrastructure, covering Java and Spring resource management, environment property handling, type conversion APIs, data binding mechanisms, generic type inspection with ResolvableType, internationalization support, the BeanFactory and ApplicationContext architecture, and the built‑in event system, all illustrated with code examples and diagrams.

ApplicationContextData BindingInternationalization
0 likes · 39 min read
Master Spring’s Core Features: Resource Management, Environment, Type Conversion and More
Architecture Digest
Architecture Digest
Apr 23, 2024 · Backend Development

14 Practical Code Optimization Tips for Java Backend Development

This article presents fourteen actionable Java backend code‑optimization techniques—including configuration‑file management, Lombok’s @RequiredArgsConstructor, modularization, exception handling, database query reduction, null‑avoidance, strategic use of design patterns, IDE shortcuts, and efficient collection handling—to help developers write cleaner, more maintainable, and higher‑performance code.

Lombokbackendcode optimization
0 likes · 7 min read
14 Practical Code Optimization Tips for Java Backend Development
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Apr 23, 2024 · Backend Development

Understanding @Configuration vs @Component in Spring: Bean Creation and Proxies

This article explains the distinct roles of Spring's @Configuration and @Component annotations, demonstrates their behavior through code examples, compares bean initialization and proxy generation, and reveals how Spring's ConfigurationClassPostProcessor and related enhancers ensure singleton beans across method calls.

ComponentDependency Injectionannotations
0 likes · 9 min read
Understanding @Configuration vs @Component in Spring: Bean Creation and Proxies
Sanyou's Java Diary
Sanyou's Java Diary
Apr 22, 2024 · Backend Development

Master Spring’s Core: Resource Management, Environment, Type Conversion, and More

Explore a comprehensive guide to Spring’s core mechanisms—including resource handling, environment configuration, type conversion, data binding, generic processing, internationalization, BeanFactory, ApplicationContext, and event publishing—complete with detailed explanations, code demos, diagrams, and practical insights for mastering backend development with Spring.

ApplicationContextData BindingEvent Publishing
0 likes · 40 min read
Master Spring’s Core: Resource Management, Environment, Type Conversion, and More
IT Niuke
IT Niuke
Apr 19, 2024 · Backend Development

Why You Should Switch from RestTemplate to Spring’s Official WebClient

The article explains that RestTemplate is deprecated in Spring 5+, outlines WebClient’s non‑blocking I/O, functional style, streaming support and improved error handling, and provides step‑by‑step code examples for synchronous and asynchronous requests, timeout configuration, and error processing.

Error handlingReactiveWebClient
0 likes · 13 min read
Why You Should Switch from RestTemplate to Spring’s Official WebClient
Code Ape Tech Column
Code Ape Tech Column
Apr 18, 2024 · Backend Development

Applying Spring Transaction Hooks for Asynchronous Kafka Message Publishing

This article explains how to use Spring's TransactionSynchronizationManager to detect active transactions and register synchronization callbacks so that Kafka messages are sent asynchronously after transaction commit, illustrated with a payment‑system logging scenario and complete Java code examples.

KafkaTransactionasynchronous
0 likes · 10 min read
Applying Spring Transaction Hooks for Asynchronous Kafka Message Publishing
Architect's Tech Stack
Architect's Tech Stack
Apr 16, 2024 · Backend Development

Should the Service Layer Use Interfaces? A Critical Discussion

This article examines whether a Service layer in Java Spring projects truly requires interfaces, debunking common arguments, exploring development workflows without interfaces, discussing project structuring for single and multiple implementations, and concluding when interfaces are beneficial or unnecessary.

Dependency Injectionarchitectureinterface
0 likes · 7 min read
Should the Service Layer Use Interfaces? A Critical Discussion
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Apr 16, 2024 · Backend Development

Speed Up Spring Startup with Parallel Bean Initialization

This article introduces Spring 6.2’s Parallel Bean Initialization feature, explains its benefits for reducing startup time, provides step‑by‑step code examples for configuring background bean initialization and a bootstrap executor, compares traditional and concurrent initialization timings, and details the underlying implementation in the Spring container.

Backend DevelopmentConcurrencyParallel Bean Initialization
0 likes · 7 min read
Speed Up Spring Startup with Parallel Bean Initialization
Architect
Architect
Apr 14, 2024 · Backend Development

How to Dynamically Load and Unload Java Governance Tasks with Custom ClassLoaders and XXL‑Job

This article explains how to design a plug‑in architecture for a data‑governance service that can start, stop, add, or upgrade individual tasks at runtime without restarting the whole service, using a custom URLClassLoader, Spring bean registration, XXL‑Job integration, dynamic configuration updates, and a clean unload process.

NacosXxl-Jobclassloader
0 likes · 26 min read
How to Dynamically Load and Unload Java Governance Tasks with Custom ClassLoaders and XXL‑Job
Shepherd Advanced Notes
Shepherd Advanced Notes
Apr 11, 2024 · Backend Development

How Spring Event Elegantly Decouples Business Logic: Principles, Usage, and Pitfalls

This article explains how Spring Event provides a publish‑subscribe mechanism to decouple Spring components, details its default synchronous behavior, shows how to make listeners asynchronous, demonstrates ordering and error handling, compares it with message‑queue solutions, and offers practical guidelines for safe usage.

Spring Bootapplicationlistenerasync
0 likes · 22 min read
How Spring Event Elegantly Decouples Business Logic: Principles, Usage, and Pitfalls
Code Ape Tech Column
Code Ape Tech Column
Apr 10, 2024 · Backend Development

Understanding and Comparing Java, Spring, and Dubbo SPI Mechanisms

This article explains the concept of Service Provider Interface (SPI), demonstrates how Java's ServiceLoader, Spring's SpringFactoriesLoader, and Dubbo's ExtensionLoader implement SPI, compares their configurations and capabilities, and discusses advanced features such as adaptive extensions, IOC/AOP integration, wrappers, and auto‑activation.

Backend DevelopmentDubboExtensionLoader
0 likes · 15 min read
Understanding and Comparing Java, Spring, and Dubbo SPI Mechanisms
JavaEdge
JavaEdge
Apr 9, 2024 · Fundamentals

What’s New in IntelliJ IDEA 2024.1? Full‑Line Completion, Java 22 Support and More

IntelliJ IDEA 2024.1 introduces full‑line code completion powered by a local deep‑learning model, Java 22 language support, a revamped terminal, sticky lines in the editor, enhanced Maven handling, improved debugging, richer Spring assistance, advanced HTTP client features, and new database tools, all aimed at boosting developer productivity and safety.

IDE FeaturesIntelliJ IDEAMaven
0 likes · 15 min read
What’s New in IntelliJ IDEA 2024.1? Full‑Line Completion, Java 22 Support and More
IT Services Circle
IT Services Circle
Apr 9, 2024 · Backend Development

ByteDance Backend Interview Experience: Key Topics and Knowledge Points

This article shares a detailed ByteDance backend interview experience covering three rounds, summarizing essential topics such as Java HashMap internals, Spring circular dependencies, MySQL indexing, OS process/thread concepts, networking protocols, TLS handshake, HTTP/2 features, and common design patterns, providing concise explanations and practical tips.

Design PatternsMySQLbackend
0 likes · 25 min read
ByteDance Backend Interview Experience: Key Topics and Knowledge Points
Selected Java Interview Questions
Selected Java Interview Questions
Apr 9, 2024 · Backend Development

Applying the Chain of Responsibility Pattern for Multi‑Level Product Validation and Workflow in Java

This article explains the Chain of Responsibility design pattern, demonstrates its use for multi‑step product validation and a reimbursement workflow in Java with Spring, provides UML diagrams, configuration handling, concrete handler implementations, client execution code, and discusses the pattern’s advantages and drawbacks.

Chain of ResponsibilityValidationbackend
0 likes · 18 min read
Applying the Chain of Responsibility Pattern for Multi‑Level Product Validation and Workflow in Java
Java Tech Enthusiast
Java Tech Enthusiast
Apr 9, 2024 · Backend Development

Understanding Spring DI: @Autowired vs @Resource and Field Injection Pitfalls

Spring supports constructor, setter, and field injection, but field injection is discouraged; @Autowired (Spring‑specific, by‑type) and @Resource (standard, by‑name) differ in defaults and IDE warnings, so prefer constructor injection for required beans, setter injection for optional ones, and only use @Resource for unavoidable field injection to lessen container coupling.

AutowiredDependency InjectionResource
0 likes · 5 min read
Understanding Spring DI: @Autowired vs @Resource and Field Injection Pitfalls
Architecture Digest
Architecture Digest
Apr 8, 2024 · Backend Development

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

This article introduces a Java library that simplifies file and resource download handling in Spring MVC and WebFlux by using annotations, reactive programming, customizable handlers, source factories, concurrent loading, compression, response writing, and event‑driven logging to support a wide range of download scenarios.

DownloadReactivebackend
0 likes · 15 min read
Design and Implementation of a Flexible Java Download Library for Spring MVC/WebFlux
Java High-Performance Architecture
Java High-Performance Architecture
Apr 8, 2024 · Backend Development

Dynamic Multi-DataSource Switching & Transaction Management in Spring

This article explores solutions for managing multiple data sources in a Spring application, covering dynamic routing with AbstractRoutingDataSource, configuration‑file and database‑table approaches, AOP‑based source switching, and custom multi‑transaction handling to ensure consistency across heterogeneous databases.

Multi-Database Transactionabstractroutingdatasourcedynamic-datasource
0 likes · 15 min read
Dynamic Multi-DataSource Switching & Transaction Management in Spring
Selected Java Interview Questions
Selected Java Interview Questions
Mar 29, 2024 · Backend Development

Dynamic Multi-DataSource Management and Transaction Handling in Spring

This article explains how to dynamically manage multiple data sources and ensure transaction consistency across a master and several application databases in Spring by extending AbstractRoutingDataSource, using configuration‑file and database‑table solutions, and implementing a custom multi‑database transaction manager.

DataSourceDynamicRoutingTransaction
0 likes · 15 min read
Dynamic Multi-DataSource Management and Transaction Handling in Spring
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Mar 29, 2024 · Backend Development

Mastering Spring BeanWrapper: Set, Get, and Convert Bean Properties Efficiently

This article introduces Spring's BeanWrapper, explains how to set and retrieve simple and nested properties, demonstrates indexed and key‑based access, covers automatic and custom type conversion using PropertyEditorSupport and Converter, and clarifies conversion priority and registration details for backend developers.

Backend DevelopmentBeanWrapperPropertyEditor
0 likes · 9 min read
Mastering Spring BeanWrapper: Set, Get, and Convert Bean Properties Efficiently
Code Ape Tech Column
Code Ape Tech Column
Mar 28, 2024 · Backend Development

A Reactive Download Library for Spring MVC and WebFlux: Design, Implementation, and Usage

This article introduces a Java library that simplifies file download in Spring applications by using a @Download annotation, supporting various source types, reactive and servlet environments, concurrent loading, compression, and customizable handlers, and details its architecture, code examples, and practical considerations.

AnnotationBackend DevelopmentFile Download
0 likes · 16 min read
A Reactive Download Library for Spring MVC and WebFlux: Design, Implementation, and Usage
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Mar 26, 2024 · Backend Development

Mastering Spring's UriComponentsBuilder: Build and Encode URIs Efficiently

This guide demonstrates how to use Spring's UriComponentsBuilder and related classes—UriBuilderFactory, ServletUriComponentsBuilder, and MvcUriComponentsBuilder—to construct, encode, and link URIs in various scenarios, providing clear code examples for each step, including handling templates, query parameters, and servlet contexts.

URIUriComponentsBuilderjava
0 likes · 6 min read
Mastering Spring's UriComponentsBuilder: Build and Encode URIs Efficiently