Tagged articles

Spring

1809 articles · Page 5 of 19
Architecture Digest
Architecture Digest
Nov 29, 2024 · Backend Development

Dynamic Service Provider Switching with Spring Smart DI

This article explains how to implement runtime switching of multiple service providers in a Spring‑based backend by configuring the active implementation in a central store and using the spring‑smart‑di library's AutowiredProxySPI to inject the appropriate bean automatically.

Dependency InjectionJavaSpring
0 likes · 7 min read
Dynamic Service Provider Switching with Spring Smart DI
Selected Java Interview Questions
Selected Java Interview Questions
Nov 28, 2024 · Backend Development

Key Considerations and Best Practices for Using Spring Event in Backend Systems

This article explains critical pitfalls and best‑practice guidelines for employing Spring Event in Java backend applications, covering graceful shutdown requirements, event loss during startup, suitable business scenarios, reliability enhancements, retry mechanisms, idempotency, and the relationship between Spring Event and message queues.

Event-Driven ArchitectureJavaReliability
0 likes · 12 min read
Key Considerations and Best Practices for Using Spring Event in Backend Systems
Architecture Digest
Architecture Digest
Nov 28, 2024 · Backend Development

Automatic Insertion of UserId and OrderId into Logs Using Spring AOP and MDC

This article explains how to automatically embed userId and orderId into log statements by defining log placeholders, storing these values in MDC via ThreadLocal, and using a custom @UserLog annotation together with Spring AOP to inject the data before method execution, complete with configuration and test examples.

AOPAnnotationJava
0 likes · 8 min read
Automatic Insertion of UserId and OrderId into Logs Using Spring AOP and MDC
Selected Java Interview Questions
Selected Java Interview Questions
Nov 27, 2024 · Backend Development

Designing a Flexible Permission Control System with Java Annotations and Spring AOP

This article explains how to build a scalable, maintainable permission control framework in Java by defining custom annotations, designing relational database tables, and using Spring AOP to intercept method calls for organization‑level, personal, limit, and special‑role checks, while providing implementation details and best‑practice recommendations.

AOPAccess ControlJava
0 likes · 21 min read
Designing a Flexible Permission Control System with Java Annotations and Spring AOP
Top Architect
Top Architect
Nov 25, 2024 · Backend Development

Using Spring Transaction Hooks to Send Kafka Messages After Transaction Commit

This article explains how to leverage Spring's TransactionSynchronizationManager to detect active transactions and register synchronization callbacks so that Kafka messages are sent asynchronously only after a transaction successfully commits, ensuring data consistency without impacting the main business flow.

JavaKafkaSpring
0 likes · 12 min read
Using Spring Transaction Hooks to Send Kafka Messages After Transaction Commit
Top Architecture Tech Stack
Top Architecture Tech Stack
Nov 20, 2024 · Backend Development

Overview of Spring Framework Utility Classes

This article provides a comprehensive overview of Spring's built‑in utility classes—including assertion, string, collection, object, file/resource, web, reflection, AOP, path‑matching, and ID generation helpers—illustrating their usage with code examples and highlighting how they improve development efficiency and code quality.

Backend DevelopmentJavaSpring
0 likes · 12 min read
Overview of Spring Framework Utility Classes
Top Architect
Top Architect
Nov 18, 2024 · Backend Development

Comprehensive Guide to Spring Framework Utility Classes and Their Usage

This article presents a detailed overview of Spring's utility classes—including Assert, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, StreamUtils, ReflectionUtils, and AOP helpers—provides code examples for each, and also contains promotional information about ChatGPT services and a developer community.

AOPJavaReflection
0 likes · 18 min read
Comprehensive Guide to Spring Framework Utility Classes and Their Usage
ITPUB
ITPUB
Nov 17, 2024 · Backend Development

Why Spring Event Can Lose Messages During Startup and How to Avoid It

A deep dive into Spring Event's delayed listener registration reveals how messages can be lost during the brief window between Kafka consumer initialization and EventListener setup, explaining the root cause, illustrating the startup order, and recommending safer alternatives for reliable message handling.

EventJavaMessage Loss
0 likes · 8 min read
Why Spring Event Can Lose Messages During Startup and How to Avoid It
Architect's Guide
Architect's Guide
Nov 14, 2024 · Backend Development

Implementing the Chain of Responsibility Pattern for Product Validation in Java

This article explains the Chain of Responsibility design pattern, demonstrates its application in a product creation workflow with concrete Java code, shows how to configure and assemble handlers dynamically using Spring, and discusses the pattern's advantages, drawbacks, and testing scenarios.

Chain of ResponsibilityJavaSpring
0 likes · 20 min read
Implementing the Chain of Responsibility Pattern for Product Validation in Java
Architect
Architect
Nov 10, 2024 · Backend Development

How to Prevent Duplicate Submissions in Java APIs with Redis and Redisson Locks

This article explains why API debouncing is crucial for backend Java services, outlines which endpoints need protection, describes how to identify duplicate requests, and provides step‑by‑step implementations using Redis shared‑cache and Redisson distributed locks with concrete code examples and test results.

Distributed LockJavaRedis
0 likes · 14 min read
How to Prevent Duplicate Submissions in Java APIs with Redis and Redisson Locks
Top Architect
Top Architect
Nov 10, 2024 · Backend Development

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

This article explains Spring's three dependency injection methods—constructor‑based, setter‑based, and field‑based—illustrates each with code examples, discusses why field injection is discouraged, and recommends using constructor injection for required dependencies and setter injection for optional ones.

Constructor InjectionJavaSpring
0 likes · 11 min read
Understanding Dependency Injection Types in Spring: Constructor, Setter, and Field Injection
Java Architect Essentials
Java Architect Essentials
Nov 5, 2024 · Backend Development

Comprehensive Guide to Activiti 7 Workflow Engine: Concepts, Environment Setup, Deployment, and Usage

This article provides a detailed tutorial on the Activiti 7 workflow engine, covering workflow concepts, BPMN modeling, environment configuration, Maven dependencies, database schema creation, deployment methods, process instance management, task handling, and historical data querying, with complete code examples for Java developers.

ActivitiBPMNDatabase
0 likes · 38 min read
Comprehensive Guide to Activiti 7 Workflow Engine: Concepts, Environment Setup, Deployment, and Usage
Architecture Digest
Architecture Digest
Nov 5, 2024 · Backend Development

Spring Annotation-Based Development and MyBatis Integration Tutorial

This article explains how Spring 3.0's pure annotation mode simplifies bean configuration, demonstrates using @Component, @Scope, @Autowired, @Qualifier, @Value, and @PropertySource for dependency injection and property loading, and shows step‑by‑step integration of MyBatis with Spring, including required dependencies and configuration classes.

Dependency InjectionJavaMyBatis
0 likes · 8 min read
Spring Annotation-Based Development and MyBatis Integration Tutorial
Top Architect
Top Architect
Nov 1, 2024 · Backend Development

Using Spring Transaction Hooks with TransactionSynchronizationManager for Asynchronous Kafka Messaging

The article explains how to leverage Spring's TransactionSynchronizationManager to detect active transactions and register synchronization callbacks that asynchronously send Kafka messages after a transaction commits, ensuring reliable fund‑flow archiving in payment systems while avoiding thread‑switch issues.

JavaKafkaSpring
0 likes · 11 min read
Using Spring Transaction Hooks with TransactionSynchronizationManager for Asynchronous Kafka Messaging
Architecture Digest
Architecture Digest
Nov 1, 2024 · Backend Development

Using Spring WebClient Instead of RestTemplate: Benefits, Code Samples, and Error Handling

Spring WebClient, the reactive replacement for the deprecated RestTemplate in Spring 5+, offers non‑blocking I/O, functional style, streaming support, and improved error handling; this article explains its benefits, demonstrates synchronous and asynchronous request patterns, timeout configuration, and comprehensive error processing with code examples.

ErrorHandlingHTTPJava
0 likes · 12 min read
Using Spring WebClient Instead of RestTemplate: Benefits, Code Samples, and Error Handling
Code Ape Tech Column
Code Ape Tech Column
Oct 31, 2024 · Backend Development

Migrating from RestTemplate to WebClient in Spring Framework: Benefits and Implementation Guide

This article explains why RestTemplate is deprecated in Spring Framework 5+, outlines the advantages of the reactive WebClient such as non‑blocking I/O, functional style, streaming and improved error handling, and provides complete Java code examples for creating, configuring, and using WebClient synchronously and asynchronously, including timeout and error management.

ErrorHandlingHTTPJava
0 likes · 13 min read
Migrating from RestTemplate to WebClient in Spring Framework: Benefits and Implementation Guide
Architect
Architect
Oct 30, 2024 · Backend Development

How to Build Distributed WebSocket Messaging with Spring, Redis, and Kafka

This article explains how to enable cross‑node WebSocket communication in a distributed Spring application by using a message queue (Redis or Kafka) to broadcast messages, tracking user connections with Redis, and providing a complete step‑by‑step implementation with code samples and configuration details.

JavaKafkaRedis
0 likes · 20 min read
How to Build Distributed WebSocket Messaging with Spring, Redis, and Kafka
Java Architect Essentials
Java Architect Essentials
Oct 25, 2024 · Backend Development

Using Lombok Annotations @RequiredArgsConstructor, @Delegate, @Cleanup, @Singular and @Builder in Spring Applications

This article demonstrates how Lombok annotations such as @RequiredArgsConstructor, @Delegate, @Cleanup, @Singular, and @Builder can be combined with Spring components to reduce boilerplate, automatically inject dependencies, manage resources, and build immutable objects, providing practical code examples and usage guidelines.

Dependency InjectionJavaLombok
0 likes · 7 min read
Using Lombok Annotations @RequiredArgsConstructor, @Delegate, @Cleanup, @Singular and @Builder in Spring Applications
dbaplus Community
dbaplus Community
Oct 23, 2024 · Backend Development

Mastering Java Thread Pools: Common Pitfalls and Best Practices

This article outlines how to correctly create, monitor, and configure Java ThreadPoolExecutor instances, explains why using the Executors factory can cause OOM, recommends separate named pools per business, provides formulas for sizing CPU‑bound and I/O‑bound workloads, and highlights real‑world pitfalls and dynamic‑configuration solutions.

ConcurrencyMonitoringSpring
0 likes · 16 min read
Mastering Java Thread Pools: Common Pitfalls and Best Practices
Architect
Architect
Oct 22, 2024 · Backend Development

Simplify Third‑Party HTTP Calls with UniHttp: A Declarative Java Client

This article explains why traditional programmatic HTTP clients cause duplicated, hard‑to‑maintain code in enterprise projects, introduces the UniHttp declarative framework with its annotations, shows a quick‑start guide, details lifecycle hooks for custom processing, and demonstrates an enterprise‑level weather‑service integration example.

Declarative APIHTTP ClientJava
0 likes · 20 min read
Simplify Third‑Party HTTP Calls with UniHttp: A Declarative Java Client
Architect's Guide
Architect's Guide
Oct 19, 2024 · Backend Development

Java Spring Development Best Practices: 14 Tips for Clean and Efficient Code

This article presents fourteen practical Java Spring development best‑practice tips—including using @ConfigurationProperties, Lombok's @RequiredArgsConstructor, modularizing code, throwing exceptions instead of returning error codes, minimizing unnecessary database calls, avoiding null returns, reducing if‑else chains, and leveraging IDE features—to help developers write cleaner, more maintainable backend code.

Best PracticesJavaLombok
0 likes · 7 min read
Java Spring Development Best Practices: 14 Tips for Clean and Efficient Code
Top Architect
Top Architect
Oct 18, 2024 · Backend Development

Using Spring Transaction Hooks to Send Kafka Messages After Commit

This article explains how to leverage Spring's TransactionSynchronizationManager to detect active transactions, register synchronization callbacks, and asynchronously send Kafka messages only after a transaction successfully commits, providing a practical example and detailed code snippets for building a reusable Spring Boot starter library.

JavaKafkaSpring
0 likes · 12 min read
Using Spring Transaction Hooks to Send Kafka Messages After Commit
macrozheng
macrozheng
Oct 18, 2024 · Backend Development

Why @Transactional Often Fails: 13 Real-World Pitfalls and How to Fix Them

An in‑depth guide reveals thirteen common pitfalls that cause Spring’s @Transactional annotation to malfunction—ranging from unnecessary usage and proxy limitations to propagation misconfigurations and exception handling—plus practical demos and solutions to ensure reliable transaction rollbacks in Java backend development.

@TransactionalAOPExceptionHandling
0 likes · 20 min read
Why @Transactional Often Fails: 13 Real-World Pitfalls and How to Fix Them
Top Architect
Top Architect
Oct 17, 2024 · Backend Development

Spring Utility Classes Overview: Assertions, ObjectUtils, CollectionUtils, File/IO, and Reflection/AOP

This article, written by a senior architect, reviews Spring’s built‑in utility classes—including assertions, object and collection helpers, file/IO operations, and reflection/AOP tools—providing code snippets and usage notes to help developers replace redundant custom utilities and improve backend Java code quality.

JavaReflectionSpring
0 likes · 15 min read
Spring Utility Classes Overview: Assertions, ObjectUtils, CollectionUtils, File/IO, and Reflection/AOP
Architect
Architect
Oct 16, 2024 · Backend Development

Mastering Spring Transaction Hooks for Safe Kafka Publishing

This article explains how to use Spring's TransactionSynchronizationManager to detect active transactions, register synchronization callbacks, and asynchronously publish payment‑log messages to Kafka without affecting the main business flow, complete with practical code snippets and pitfalls to avoid.

JavaKafkaSpring
0 likes · 11 min read
Mastering Spring Transaction Hooks for Safe Kafka Publishing
Java Architect Essentials
Java Architect Essentials
Oct 13, 2024 · Backend Development

Diagnosing and Optimizing Startup Performance of a Legacy Dubbo Service with JProfile

This article walks through a systematic investigation of a slow‑starting Dubbo service built on Spring 3.2, using JProfile to pinpoint costly class‑loading checks, disabling unnecessary annotation processing, and resolving thread‑waiting issues caused by RabbitMQ and other components, ultimately reducing deployment time by about 40%.

DubboJProfileJava
0 likes · 7 min read
Diagnosing and Optimizing Startup Performance of a Legacy Dubbo Service with JProfile
Architecture Digest
Architecture Digest
Oct 13, 2024 · Backend Development

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

The article explains how to simplify Spring MVC controller code by introducing a unified response wrapper, handling String return types with ResponseBodyAdvice, adjusting HttpMessageConverter order, applying JSR‑303 validation for @RequestParam, @PathVariable and @RequestBody, creating custom validation annotations, and implementing global exception handling for consistent API responses.

ControllerExceptionHandlingJava
0 likes · 18 min read
Improving Spring MVC Controllers: Unified Response Structure, Validation, and Exception Handling
macrozheng
macrozheng
Oct 11, 2024 · Backend Development

Does Spring Commit Before Unlock? Unraveling Transaction Timing in High‑Concurrency

This article dissects the exact moment a Spring @Transactional method commits relative to a surrounding lock, explains why committing after unlock can cause overselling, and provides source‑level debugging techniques to verify transaction start, commit, and rollback behavior in MySQL under high concurrency.

ConcurrencyDatabaseJava
0 likes · 21 min read
Does Spring Commit Before Unlock? Unraveling Transaction Timing in High‑Concurrency
Code Ape Tech Column
Code Ape Tech Column
Oct 7, 2024 · Backend Development

Dynamic Service Provider Switching with spring-smart-di and AutowiredProxySPI

This article explains how to implement runtime switching of multiple service providers, such as SMS vendors, in a Spring-based backend using the spring‑smart‑di library, @EnvironmentProxySPI, and @AutowiredProxySPI annotations, with configuration stored in Nacos, databases, or environment variables.

Dependency InjectionDynamic SwitchingJava
0 likes · 8 min read
Dynamic Service Provider Switching with spring-smart-di and AutowiredProxySPI
Architecture Digest
Architecture Digest
Sep 29, 2024 · Backend Development

Implementing a Fixed‑Size FIFO Export Queue in a Java Backend with Spring and EasyExcel

This article explains how to design and implement a fixed-size FIFO export queue in a Java backend using Spring components and EasyExcel, covering business requirements, class definitions, code examples, testing results, and considerations for further enhancements such as Redis queues and high‑concurrency scenarios.

EasyExcelExportJava
0 likes · 12 min read
Implementing a Fixed‑Size FIFO Export Queue in a Java Backend with Spring and EasyExcel
Java Architect Essentials
Java Architect Essentials
Sep 24, 2024 · Backend Development

Understanding the State Pattern and Implementing Order Workflow with Spring State Machine

This article explains the State design pattern, demonstrates its Java implementation with example code, introduces Spring State Machine concepts, and provides a complete step‑by‑step guide to building and testing an order status workflow using Spring State Machine, including configuration, listeners, services, and a controller.

JavaOrder WorkflowSpring
0 likes · 13 min read
Understanding the State Pattern and Implementing Order Workflow with Spring State Machine
IT Architects Alliance
IT Architects Alliance
Sep 24, 2024 · Backend Development

Implementing a FIFO Export Queue for Large Data Exports in Java

The article describes a Java‑based FIFO export queue that limits concurrent MySQL export operations, outlines the related classes (ExportQueue, AbstractExport, ExportImpl, and a test controller), provides full source code, and presents test results showing how the queue manages up to ten simultaneous export requests.

ConcurrencyEasyExcelExportQueue
0 likes · 11 min read
Implementing a FIFO Export Queue for Large Data Exports in Java
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Sep 23, 2024 · Backend Development

Mastering Spring Bean Lifecycle: 8 Essential Stages Explained

This article walks through the eight critical phases of a Spring bean's lifecycle—from instantiation and property population to initialization, post‑processor hooks, usage, and destruction—detailing how Spring creates, configures, enhances, and finally disposes of beans, with code snippets and diagrams for clarity.

Backend DevelopmentBean LifecycleDependency Injection
0 likes · 5 min read
Mastering Spring Bean Lifecycle: 8 Essential Stages Explained
ITPUB
ITPUB
Sep 21, 2024 · Backend Development

Why Spring Event Can Crash Your Service During Shutdown and How to Avoid It

The article recounts a production incident where Spring Event caused bean‑lookup failures during service shutdown, explains the three‑step usage of Spring Event with code examples, and presents three mitigation strategies—abandoning Spring Event, handling exceptions with MQ retries, and implementing graceful shutdown—ultimately opting to drop Spring Event.

EventJavaSpring
0 likes · 5 min read
Why Spring Event Can Crash Your Service During Shutdown and How to Avoid It
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.

Distributed LockJavaRedis
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.

ConcurrencyJavaSpring
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 PermissionJava
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 DevelopmentDependency InjectionIOC
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.

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

@TransactionalAOPDatabase
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.

DistributedKafkaMessage Queue
0 likes · 17 min read
Distributed WebSocket Messaging with Redis and Kafka in Spring
Programmer XiaoFu
Programmer XiaoFu
Sep 12, 2024 · Backend Development

How Major Companies Implement Distributed Tracing with TraceIdFilter, MDC, and SkyWalking

The article explains how to solve interleaved multi‑thread logs in micro‑services by adding a X‑App‑Trace‑Id header, extracting it in a TraceIdFilter, storing it in SLF4J MDC, propagating it through Feign, adapting it for child threads, and finally integrating SkyWalking to print both application and SkyWalking trace IDs in Logback.

Distributed TracingMDCSkyWalking
0 likes · 16 min read
How Major Companies Implement Distributed Tracing with TraceIdFilter, MDC, and SkyWalking
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.

HTTP ClientJavaRestClient
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.

AOPDatabaseJava
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 DevelopmentBest PracticesDesign 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 ProcessingPersistenceSpring
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.

Bean LifecycleDependency InjectionJava
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 DevelopmentJavaSpring
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 DevelopmentDependency InjectionJava
0 likes · 6 min read
Master the 9 Essential SpringBoot Annotations for Backend Development
Programmer XiaoFu
Programmer XiaoFu
Aug 29, 2024 · Backend Development

Why @Transactional Often Fails: 13 Real‑World Pitfalls from 6 Years of Experience

This article analyses thirteen common mistakes that cause Spring's @Transactional annotation to be ineffective or not roll back, covering unnecessary usage, private/final/static methods, self‑invocation, wrong propagation settings, async threads, unmanaged beans, exception handling and more, with concrete code demos and solutions.

@TransactionalAOPJava
0 likes · 21 min read
Why @Transactional Often Fails: 13 Real‑World Pitfalls from 6 Years of Experience
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.

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

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

APIJavaSpring
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 DevelopmentJavaMaven
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.

Backend DevelopmentDependencyInjectionLombok
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.

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

Dependency InjectionFactoryJava
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 DevelopmentDependency InjectionInversion of Control
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.

Best PracticesEventJava
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 PatternsKafkaSpring
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 InjectionDependency 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.

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

Why Spring Discourages Field Injection: A Comparison of Constructor, Setter, and Field Injection

The article explains why Spring discourages field injection, compares constructor, setter, and field injection types, provides Java code examples, and outlines the drawbacks of field injection such as immutability issues, SRP violations, container coupling, and hidden dependencies.

Constructor InjectionDependency InjectionField Injection
0 likes · 9 min read
Why Spring Discourages Field Injection: A Comparison of Constructor, Setter, and Field Injection
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.

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

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

Best PracticesJavaLombok
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.

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

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

AnnotationDependency InjectionJava
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.

AnnotationDependency InjectionJava
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.

FiltersRoutingSpring
0 likes · 8 min read
Master Spring Cloud Gateway: Routing, Metrics, Filters & Debugging Tips