Tagged articles
1744 articles
Page 5 of 18
Top Architect
Top Architect
Sep 20, 2024 · Backend Development

Implementing Interface Debounce with Distributed Locks in Java Backend Systems

This article explains the concept of request debouncing, identifies which API endpoints need it, and demonstrates two distributed lock solutions—shared Redis cache and Redisson—by providing complete Java code examples, configuration steps, and test results to prevent duplicate submissions in backend services.

DebounceJavadistributed-lock
0 likes · 17 min read
Implementing Interface Debounce with Distributed Locks in Java Backend Systems
Java Backend Technology
Java Backend Technology
Sep 18, 2024 · Backend Development

Why Fast‑Retry Beats Spring‑Retry for Massive Asynchronous Retries

Fast‑Retry is a high‑performance, multi‑task asynchronous retry framework for Java that dramatically outperforms traditional synchronous retry libraries like Spring‑Retry and Guava‑Retry, especially when handling millions of tasks, by leveraging non‑blocking execution, customizable strategies, and seamless Spring integration.

AsynchronousJavaRetry
0 likes · 13 min read
Why Fast‑Retry Beats Spring‑Retry for Massive Asynchronous Retries
Top Architect
Top Architect
Sep 16, 2024 · Backend Development

Implementing Data Permission Interceptor in MyBatis‑Plus Using Custom Annotations

This article explains how to create a custom annotation and MyBatis‑Plus interceptor to enforce data‑permission filtering based on user roles, provides both basic and advanced implementations with complete Java code examples, and shows how to integrate the interceptor into the MyBatis‑Plus plugin configuration.

Backend DevelopmentData PermissionInterceptor
0 likes · 15 min read
Implementing Data Permission Interceptor in MyBatis‑Plus Using Custom Annotations
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Sep 16, 2024 · Backend Development

Mastering Spring’s IOC Container: Concepts, Types, and Startup Steps

This article explains the Inversion of Control principle, defines what an IOC container is, compares Spring’s BeanFactory and ApplicationContext, and walks through the three-stage startup process—including loading configurations, registering bean definitions, and instantiating beans with automatic dependency injection.

Backend DevelopmentIoCJava
0 likes · 5 min read
Mastering Spring’s IOC Container: Concepts, Types, and Startup Steps
Top Architect
Top Architect
Sep 15, 2024 · Backend Development

Overview of Common Spring Utility Classes

This article presents a comprehensive collection of frequently used Spring framework utility classes—including Assert, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, ReflectionUtils, and AopUtils—explaining their purpose, typical use cases, and providing code snippets for each method to help developers avoid redundant implementations.

JavaReflectionaop
0 likes · 18 min read
Overview of Common Spring Utility Classes
IT Services Circle
IT Services Circle
Sep 14, 2024 · Backend Development

Spring Transaction Pitfalls: Common Scenarios Where Transactions Fail and How to Fix Them

This article explains the most common reasons why Spring @Transactional annotations may become ineffective or fail to roll back, covering access‑modifier issues, final methods, internal calls, self‑injection, multithreading, unsupported table engines, mis‑configured propagation, exception handling, nested transactions, large‑transaction problems, and the advantages of programmatic transaction management.

Javaaopdatabase
0 likes · 20 min read
Spring Transaction Pitfalls: Common Scenarios Where Transactions Fail and How to Fix Them
Code Ape Tech Column
Code Ape Tech Column
Sep 12, 2024 · Backend Development

Distributed WebSocket Messaging with Redis and Kafka in Spring

This article explains how to enable cross‑server WebSocket communication in a distributed Spring application by using a message queue such as Redis or Kafka, detailing two architectural approaches, concrete code examples, configuration files, and a sample client page.

BackendDistributedKafka
0 likes · 17 min read
Distributed WebSocket Messaging with Redis and Kafka in Spring
FunTester
FunTester
Sep 12, 2024 · Backend Development

Choosing the Right Spring HTTP Client: RestTemplate vs WebClient vs RestClient

Spring offers multiple HTTP clients—RestTemplate, WebClient, and the newer RestClient—each with distinct features, performance characteristics, and suitability for different scenarios, and this guide compares their core capabilities, advantages, drawbacks, and best-use cases to help developers select the optimal client for their projects.

BackendHTTP clientJava
0 likes · 15 min read
Choosing the Right Spring HTTP Client: RestTemplate vs WebClient vs RestClient
Su San Talks Tech
Su San Talks Tech
Sep 9, 2024 · Backend Development

Why Your Spring @Transactional Might Fail: 7 Common Pitfalls and How to Fix Them

This article explains why Spring transactions can become ineffective or fail to roll back, covering issues such as wrong method visibility, final methods, internal calls, missing Spring bean registration, multithreading, unsupported table engines, misconfigured propagation, exception handling, and offers practical solutions for each case.

Javaaopdatabase
0 likes · 21 min read
Why Your Spring @Transactional Might Fail: 7 Common Pitfalls and How to Fix Them
Top Architect
Top Architect
Sep 6, 2024 · Backend Development

14 Java Backend Code‑Optimization Tips from a Senior Architect

This article presents fourteen practical Java backend optimization techniques—including configuration‑file management, Lombok’s @RequiredArgsConstructor, modular code design, exception handling, reducing DB queries, avoiding null returns, minimizing if‑else, slimming controllers, IDE shortcuts, source‑code reading, design patterns, and efficient collections—each illustrated with clear code examples.

Backend DevelopmentCode OptimizationDesign Patterns
0 likes · 10 min read
14 Java Backend Code‑Optimization Tips from a Senior Architect
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Sep 5, 2024 · Backend Development

Deep Dive into Spring StateMachine: Architecture, Startup, Event Handling, and Persistence

This article provides an in‑depth technical analysis of Spring StateMachine's internal architecture, covering its class hierarchy, lifecycle start/stop mechanisms, pseudo‑state types, trigger processing, event dispatching, and persistence strategies, all illustrated with concrete code examples.

Event ProcessingPersistenceState Management
0 likes · 13 min read
Deep Dive into Spring StateMachine: Architecture, Startup, Event Handling, and Persistence
Architect
Architect
Sep 4, 2024 · Backend Development

Unlocking Spring Bean Lifecycle: 17 Extension Points Every Developer Should Master

This article systematically catalogs every Spring and Spring Boot extension interface—from ApplicationContextInitializer to DisposableBean—illustrates their invocation order with a diagram, explains practical use‑cases, and provides concrete code samples for each hook, enabling developers to tap into the bean lifecycle for custom initialization, monitoring, and cleanup.

BackendExtension PointsJava
0 likes · 20 min read
Unlocking Spring Bean Lifecycle: 17 Extension Points Every Developer Should Master
Java Tech Enthusiast
Java Tech Enthusiast
Sep 4, 2024 · Information Security

Spring and Nacos Security Vulnerabilities and Mitigation Guide

Recent disclosures revealed critical Spring DoS flaws (CVE‑2024‑38809 and CVE‑2024‑38808) exploitable via oversized If‑Match/If‑None‑Match headers and malicious SpEL expressions, plus a Nacos 2.4.1 vulnerability allowing arbitrary file read/write through port 7848, mitigated by upgrading to the patched Spring and Nacos releases or restricting the vulnerable ports.

CVEJavaNacos
0 likes · 7 min read
Spring and Nacos Security Vulnerabilities and Mitigation Guide
21CTO
21CTO
Aug 31, 2024 · Backend Development

Top Java Frameworks to Accelerate Your 2024 Web Development

This article reviews the most popular Java frameworks for 2024, explaining their purpose, key features, and how they help developers build scalable, secure, and efficient web applications across various industries.

Backend DevelopmentJavaWeb Development
0 likes · 9 min read
Top Java Frameworks to Accelerate Your 2024 Web Development
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Aug 30, 2024 · Backend Development

Master the 9 Essential SpringBoot Annotations for Backend Development

This article provides a concise yet comprehensive guide to the most common SpringBoot annotations—including @SpringBootApplication, @EnableAutoConfiguration, @ComponentScan, @Service, @Repository, @Component, @RestController, @Bean, @ResponseBody, and @Autowired—explaining their purpose, composition, and practical code examples for building robust Java backend applications.

Backend DevelopmentJavaSpringBoot
0 likes · 6 min read
Master the 9 Essential SpringBoot Annotations for Backend Development
Java Tech Enthusiast
Java Tech Enthusiast
Aug 29, 2024 · Backend Development

Comprehensive Backend Interview Guide: Network, Security, JVM, Spring, Redis, MySQL and More

The guide equips candidates for backend interviews by covering essential networking (HTTP/HTTPS, TLS handshake, status codes, headers, OCSP, session resumption, CSRF), RPC frameworks, Java class-loading and JVM memory/GC, OS process/thread scheduling, Spring bean lifecycle, Redis caching pitfalls, and MySQL indexing and query optimization.

BackendJVMinterview
0 likes · 44 min read
Comprehensive Backend Interview Guide: Network, Security, JVM, Spring, Redis, MySQL and More
Practical DevOps Architecture
Practical DevOps Architecture
Aug 29, 2024 · Backend Development

Comprehensive Java Backend Architecture Course: Spring, SpringBoot, JVM, MySQL, Redis, Microservices, and More

This course provides an in‑depth exploration of the technical challenges faced by Java architects, covering Spring bean lifecycle, AOP, transaction mechanisms, SpringBoot auto‑configuration, JVM memory models, MySQL indexing, Redis caching, microservice patterns, distributed locks, and performance optimization techniques across 99 video modules.

JavaMicroservicesspring
0 likes · 8 min read
Comprehensive Java Backend Architecture Course: Spring, SpringBoot, JVM, MySQL, Redis, Microservices, and More
Architect's Guide
Architect's Guide
Aug 25, 2024 · Backend Development

Eight Ways to Implement Asynchronous Execution in Java

This article introduces eight common Java asynchronous implementation techniques—including raw threads, Future, CompletableFuture, Spring @Async, ApplicationEvent, message queues, third‑party utilities like Hutool ThreadUtil and Guava ListenableFuture—explaining their usage, code examples, advantages, and drawbacks for improving performance in scenarios such as sending SMS or emails.

CompletableFutureFutureGuava
0 likes · 14 min read
Eight Ways to Implement Asynchronous Execution in Java
Top Architect
Top Architect
Aug 21, 2024 · Backend Development

Designing a Unified API Response Structure with Custom Annotations and Interceptors

This article explains how to design a clean, unified API response format for backend services by defining a standard JSON wrapper, categorizing status codes, adding descriptive messages, and using custom @ResponseResult annotations together with interceptors and controller advice to automatically wrap and handle responses in a Spring‑based application.

APIJavaResponse wrapper
0 likes · 9 min read
Designing a Unified API Response Structure with Custom Annotations and Interceptors
Java Tech Enthusiast
Java Tech Enthusiast
Aug 21, 2024 · Backend Development

Common Configuration and Code Issues in a New Java Backend Project

On his first day the new Java backend developer discovered duplicated internal and external configuration files causing NullPointerExceptions, hard‑coded role strings, mixed System.out and logger calls, missing manager review leading to DB mismatches, arbitrary production database edits, and Maven pom‑type dependency errors, prompting a shift to unified application.yml settings, JVM‑specified config locations, consistent logging, and stricter coding standards.

Backend DevelopmentConfigurationJava
0 likes · 5 min read
Common Configuration and Code Issues in a New Java Backend Project
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Aug 21, 2024 · Backend Development

Using Lombok @RequiredArgsConstructor to Reduce @Autowired Boilerplate in Spring Services

This article explains how Lombok's @RequiredArgsConstructor can replace repetitive @Autowired field injections in Spring services by generating a constructor for final fields, demonstrates the underlying annotation‑processing mechanism, and provides practical code examples for applying this technique in backend Java projects.

AutowireBackend DevelopmentDependencyInjection
0 likes · 8 min read
Using Lombok @RequiredArgsConstructor to Reduce @Autowired Boilerplate in Spring Services
Top Architect
Top Architect
Aug 19, 2024 · Backend Development

Using Spring TransactionSynchronizationManager for Transaction Hooks and Asynchronous Kafka Messaging

This article explains how to leverage Spring's TransactionSynchronizationManager to detect active transactions, register synchronization callbacks, and asynchronously send Kafka messages after transaction commit, providing a starter library design for Java backend services that need reliable transaction‑aware messaging.

AsynchronousJavaTransactionSynchronizationManager
0 likes · 12 min read
Using Spring TransactionSynchronizationManager for Transaction Hooks and Asynchronous Kafka Messaging
Architect's Guide
Architect's Guide
Aug 19, 2024 · Fundamentals

Applying the Strategy Pattern with Simple Factory in a Java Backend Service

This article explains how to use the Strategy pattern combined with a simple factory in a Spring‑based Java backend, showing interface definition, multiple arithmetic strategy implementations, a factory that registers them in a map, a service that selects a strategy at runtime, and a REST controller for testing.

BackendFactoryJava
0 likes · 6 min read
Applying the Strategy Pattern with Simple Factory in a Java Backend Service
Architect's Journey
Architect's Journey
Aug 19, 2024 · Backend Development

Flexible Multi-MQ Component Update: Switch Between RocketMQ, Redis, Kafka, and RabbitMQ

The article explains why adopting a message‑queue improves microservice decoupling and responsibility boundaries, then details the design of a pluggable Base‑MQ component—including @MQEventListener, MQEvent base class, configuration, and MQClient interface—followed by concrete implementations for RocketMQ, Kafka, Redis and RabbitMQ, an example event flow, and guidance for extending the framework.

JavaKafkaMessage Queue
0 likes · 27 min read
Flexible Multi-MQ Component Update: Switch Between RocketMQ, Redis, Kafka, and RabbitMQ
Architect
Architect
Aug 16, 2024 · Information Security

How to Patch Critical Spring & Nacos Vulnerabilities in 2024

This article analyzes recent critical security flaws in Spring Framework (CVE‑2024‑38808 and CVE‑2024‑38809) and Nacos Jraft port, explains their impact, provides version‑specific mitigation steps, code snippets for Spring Boot fixes, and offers additional hardening recommendations for developers and operators.

CVE-2024-38808CVE-2024-38809Nacos
0 likes · 7 min read
How to Patch Critical Spring & Nacos Vulnerabilities in 2024
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Aug 16, 2024 · Backend Development

Understanding IOC vs Dependency Injection in Spring: Key Differences Explained

This article clarifies how Inversion of Control (IoC) serves as a design pattern that hands control to an external container, while Dependency Injection (DI) is a concrete IoC implementation that automatically supplies required objects, detailing their definitions, purposes, implementations, and typical usage scenarios.

Backend DevelopmentInversion of ControlJava
0 likes · 4 min read
Understanding IOC vs Dependency Injection in Spring: Key Differences Explained
Architect's Guide
Architect's Guide
Aug 14, 2024 · Backend Development

Key Considerations and Best Practices for Using Spring Event in Production

This article explains critical pitfalls, proper shutdown handling, event loss during startup, suitable business scenarios, reliability guarantees, and best‑practice patterns for employing Spring Event in high‑traffic backend systems, providing concrete code examples and operational recommendations.

BackendEventJava
0 likes · 11 min read
Key Considerations and Best Practices for Using Spring Event in Production
Java Interview Crash Guide
Java Interview Crash Guide
Aug 13, 2024 · Backend Development

How to Build a Robust Asynchronous Processing SDK with Spring and Kafka

This article explains the design, advantages, and implementation details of a generic asynchronous processing SDK that leverages Spring transactional events, Kafka messaging, XXL‑Job scheduling, and a non‑intrusive architecture to ensure data consistency, fault tolerance, and easy integration across services.

Design PatternsKafkaasynchronous processing
0 likes · 11 min read
How to Build a Robust Asynchronous Processing SDK with Spring and Kafka
Top Architect
Top Architect
Aug 12, 2024 · Backend Development

Why Field Injection Is Discouraged in Spring and Preferred Alternatives

The article explains that Spring no longer recommends @Autowired field injection, describes constructor‑based, setter‑based, and field‑based dependency injection types, illustrates each with code examples, and outlines the drawbacks of field injection such as immutability issues, SRP violations, and tight coupling to the container.

Backend DevelopmentConstructor InjectionField Injection
0 likes · 11 min read
Why Field Injection Is Discouraged in Spring and Preferred Alternatives
Java Architect Essentials
Java Architect Essentials
Aug 11, 2024 · Backend Development

Why @Transactional Can Invalidate Locks in Spring and How to Fix It

This article explains how using Spring's @Transactional annotation together with explicit locks can cause unexpected concurrency issues, demonstrates the problem with sample code, analyzes why the lock becomes ineffective, and presents solutions such as separating transactional methods, using programmatic transactions, or locking the entire transaction.

JavaLockconcurrency
0 likes · 6 min read
Why @Transactional Can Invalidate Locks in Spring and How to Fix It
Java Architect Essentials
Java Architect Essentials
Aug 5, 2024 · Backend Development

Fast Testing of MyBatis SQL Without Starting Spring

This article explains how to quickly test MyBatis SQL statements by bypassing the Spring container, using a minimal MyBatis configuration, adding support for PageHelper pagination and MyBatis‑Plus plugins, and provides code examples and a plugin recommendation for efficient backend development.

BackendJavaMyBatis
0 likes · 4 min read
Fast Testing of MyBatis SQL Without Starting Spring
Code Ape Tech Column
Code Ape Tech Column
Aug 5, 2024 · Backend Development

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

This article describes a Java‑based asynchronous processing SDK that leverages Spring AOP, transactional event listeners, Kafka, XXL‑Job, and MySQL to provide non‑intrusive, reliable, and eventually consistent background execution of business methods while preserving transaction integrity and offering configurable retry and compensation strategies.

AsyncJavaKafka
0 likes · 8 min read
Design and Implementation of a Generic Asynchronous Processing SDK for Java Backend
Top Architect
Top Architect
Aug 2, 2024 · Backend Development

14 Practical Tips for Optimizing Java Backend Code

This article presents fourteen actionable techniques for improving Java backend code quality, including using configuration files, Lombok's @RequiredArgsConstructor, modular design, exception handling, reducing unnecessary database calls, avoiding null returns, simplifying if‑else logic, minimizing controller logic, leveraging IDE features, reading source code, applying design patterns, embracing new knowledge, mastering fundamentals, and efficiently checking element existence, supplemented with concrete code examples.

Code OptimizationJavaLombok
0 likes · 9 min read
14 Practical Tips for Optimizing Java Backend Code
Code Ape Tech Column
Code Ape Tech Column
Aug 2, 2024 · Backend Development

Improving Spring MVC Controllers: Unified Response Structure, Validation, and Exception Handling

This article explains how to refactor Spring MVC controller layers by introducing a unified response wrapper, handling String conversion issues with ResponseBodyAdvice, applying JSR‑303 validation for request parameters, creating custom validation annotations, and implementing custom exceptions with a global exception handler to produce clean, maintainable backend code.

BackendControllerJava
0 likes · 21 min read
Improving Spring MVC Controllers: Unified Response Structure, Validation, and Exception Handling
Top Architect
Top Architect
Aug 1, 2024 · Backend Development

Best Practices for Designing a Robust Controller Layer in Spring Backend Applications

This article explains how to build a clean, maintainable Controller layer in Spring by separating responsibilities, unifying response structures, applying global response wrapping, leveraging JSR‑303 validation for parameters, creating custom validation rules, and handling exceptions uniformly, all illustrated with practical Java code examples.

ControllerJavaexceptionhandling
0 likes · 18 min read
Best Practices for Designing a Robust Controller Layer in Spring Backend Applications
Selected Java Interview Questions
Selected Java Interview Questions
Aug 1, 2024 · Backend Development

Spring Annotation-Based Development and MyBatis Integration Guide

This article explains how Spring 3.0's pure annotation development simplifies bean configuration, demonstrates defining beans with @Component, managing bean scopes, performing various injection techniques, reading properties files, and integrating MyBatis, providing complete code examples and best‑practice tips for backend Java developers.

BackendJavaMyBatis
0 likes · 11 min read
Spring Annotation-Based Development and MyBatis Integration Guide
Java Backend Technology
Java Backend Technology
Jul 30, 2024 · Backend Development

Spring Annotation Development: From Bean Definition to MyBatis Integration

This article explains how Spring’s pure annotation development replaces XML bean definitions, covers component scanning, bean scopes, derived annotations, various injection methods, property file loading, and demonstrates seamless Spring‑MyBatis integration, showing step‑by‑step code examples that simplify backend configuration.

JavaMyBatisannotation
0 likes · 9 min read
Spring Annotation Development: From Bean Definition to MyBatis Integration
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.

DebuggingFiltersMetrics
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.

BackendFrameworkJava
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 ConfigurationJavaannotations
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.

HttpClientJavaRetry
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.

CodeExamplesJavaReflection
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.

JavaSingletonconcurrency
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.

BackendExport 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.

APIJavaResponse wrapper
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 PackGradleJava
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.

BackendJavaKafka
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.

BackendDesignJava
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.

DebounceJavaannotation
0 likes · 18 min read
Backend Request Debounce and Distributed Lock Implementation in Java
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.

AdviceBackendDynamic 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.

Backend ArchitectureInterface DesignService Layer
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.

AbstractCacheCache PreheatCommandLineRunner
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 ImportJavaasynchronous 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 DevelopmentInterfaceService Layer
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.

APIError HandlingJava
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 ProcessorJavaObject Mapping
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.

BackendJavaKafka
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.

ExtensionPointsJavaLifecycle
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.

COLAJavaspring
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.

Factory BeanJavaService 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.

ExportJavaQueue
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.

IdempotencyJavaannotations
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.

AsyncExcelJava
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.

DependencyInjectionJavaLifecycle
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.

JavaSpring BootSpring MVC
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.

DependencyInjectionJavaLifecycle
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 InjectionField InjectionSetter 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.

DynamicLoadingJavaMicroservices
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.

ControllerJavaexceptionhandling
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.

Dynamic PluginHot PlugJava
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.

BackendJavaPersistence
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 DevelopmentControllerException Handling
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 PersistenceEhcacheJava
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.

JWTJavaToken
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 DevelopmentBeanFactoryIoC
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.

BackendConfiguration ValidationJava
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.

BackendDynamicAdviceHotPluggable
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.

JavaPersistenceaop
0 likes · 25 min read
Comprehensive Guide to Spring State Machine: Concepts, Implementation, Persistence, and Troubleshooting