Tagged articles
1744 articles
Page 4 of 18
Code Ape Tech Column
Code Ape Tech Column
Mar 10, 2025 · Backend Development

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

This article explains how to dynamically switch between multiple service providers, such as SMS vendors, in a Spring‑based backend by using spring‑smart‑di's @AutowiredProxySPI and related annotations, covering configuration, Maven dependency, enabling the feature, and custom proxy implementations.

BackendDynamic ConfigurationJava
0 likes · 9 min read
Dynamic Service Provider Switching with spring-smart-di and AutowiredProxySPI
Code Ape Tech Column
Code Ape Tech Column
Mar 7, 2025 · Backend Development

Using Spring's ResponseBodyEmitter for Real‑Time Streaming Responses

This article introduces Spring Framework's ResponseBodyEmitter, explains its advantages over SSE for asynchronous HTTP responses, demonstrates practical usage with a real‑time log‑streaming example, outlines core methods, working principles, best‑practice considerations, and compares it with traditional Streaming and Server‑Sent Events.

BackendHTTPJava
0 likes · 10 min read
Using Spring's ResponseBodyEmitter for Real‑Time Streaming Responses
Java Tech Enthusiast
Java Tech Enthusiast
Mar 4, 2025 · Backend Development

When to Use volatile with ConcurrentHashMap and Spring Bean Thread Safety

A ConcurrentHashMap is internally thread‑safe, so a volatile declaration is only required when its reference may be reassigned (or the field is final), while Spring singleton beans with mutable fields are not thread‑safe and should be made stateless, prototype‑scoped, or synchronized for composite operations.

ConcurrentHashMapJavaspring
0 likes · 13 min read
When to Use volatile with ConcurrentHashMap and Spring Bean Thread Safety
Java Backend Technology
Java Backend Technology
Mar 4, 2025 · Backend Development

When Are Service‑Layer Interfaces Really Needed?

This article examines the three classic reasons for defining interfaces on Service and DAO layers, explains why they often fall short when using Spring's dependency injection, and offers practical structuring and workflow tips for projects that may or may not require multiple implementations.

BackendInterfaceService Layer
0 likes · 8 min read
When Are Service‑Layer Interfaces Really Needed?
IT Services Circle
IT Services Circle
Mar 3, 2025 · Backend Development

Meituan Spring Hiring Overview and Java Backend Interview Q&A

This article discusses Meituan's spring recruitment numbers, then provides detailed Java backend interview questions and answers covering Spring MVC vs Spring Boot, MySQL MVCC, Redis Zset implementation, message queue reliability, HashMap internals, and thread pool usage, offering practical insights for candidates.

BackendJavaThreadPool
0 likes · 20 min read
Meituan Spring Hiring Overview and Java Backend Interview Q&A
Java Backend Technology
Java Backend Technology
Feb 28, 2025 · Backend Development

Refactor Spring Controllers for Unified Responses and Robust Validation

This article explains why Controllers are essential in Spring MVC, identifies common problems such as tangled validation and inconsistent responses, and demonstrates how to introduce a unified return structure, use ResponseBodyAdvice for automatic wrapping, handle String conversion issues, apply JSR‑303 validation, create custom validators, and centralize exception handling to produce cleaner, more maintainable backend code.

Controllerexceptionhandlingresponsebodyadvice
0 likes · 19 min read
Refactor Spring Controllers for Unified Responses and Robust Validation
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 27, 2025 · Backend Development

Understanding and Using Spring's @Import Annotation

This article explains the purpose, usage patterns, and internal mechanics of Spring's @Import annotation, including importing regular classes, ImportSelector implementations, and ImportBeanDefinitionRegistrar implementations, with complete code examples and a discussion of how Spring processes these imports at runtime.

BackendConfigurationDependencyInjection
0 likes · 9 min read
Understanding and Using Spring's @Import Annotation
Architect's Journey
Architect's Journey
Feb 24, 2025 · Backend Development

Why I Stopped Using Spring’s @Autowired and Adopted Explicit Dependency Management

The article explains how automatic @Autowired injection can tightly couple domain models to the Spring container, hide dependencies, hinder testing, create circular‑dependency risks, and violate clean architecture, then demonstrates an explicit‑dependency approach with a custom SpringContext utility, compares both methods, and offers practical guidelines for layered design and testing.

AutowiredDDDExplicit Dependencies
0 likes · 7 min read
Why I Stopped Using Spring’s @Autowired and Adopted Explicit Dependency Management
Top Architecture Tech Stack
Top Architecture Tech Stack
Feb 20, 2025 · Backend Development

Implementing the Chain of Responsibility Pattern for Product Validation and Workflow Approval in Java

This article explains the Chain of Responsibility design pattern, demonstrates its application in multi‑step product validation and expense‑approval workflows with detailed Java code, configuration handling, Spring bean injection, and discusses its advantages and drawbacks.

Chain of ResponsibilityJavadesign pattern
0 likes · 21 min read
Implementing the Chain of Responsibility Pattern for Product Validation and Workflow Approval in Java
Alibaba Cloud Developer
Alibaba Cloud Developer
Feb 8, 2025 · Backend Development

Unlocking Spring’s Core: A Deep Dive into the IOC Container Mechanics

This article explores the fundamental mechanisms of the Spring container, detailing its architecture, core jars, bean factory processes, configuration parsing, bean instantiation, property population, and design patterns such as Factory, Singleton, Builder, Decorator, Observer, and Strategy, while providing extensive code examples and diagrams.

BeanFactoryDesign PatternsIoC
0 likes · 52 min read
Unlocking Spring’s Core: A Deep Dive into the IOC Container Mechanics
Architect's Guide
Architect's Guide
Feb 6, 2025 · Backend Development

Optimizing Large IN Queries with Spring AOP and Multi‑Threaded Splitting

This article explains how to improve performance of massive IN‑list database queries in Java by defining custom Spring AOP annotations that automatically split the parameter list, execute the sub‑queries concurrently in a thread pool, and merge the results using a configurable return‑handling strategy.

Javaaopin-query
0 likes · 10 min read
Optimizing Large IN Queries with Spring AOP and Multi‑Threaded Splitting
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 3, 2025 · Backend Development

Code Review of Coupon Claim and Approval Workflow: Issues and Optimization Strategies

This article reviews Java Spring code for a coupon claim and approval workflow, identifies concurrency and transaction issues such as missing locks and inconsistent update order, and proposes optimizations including user‑level locking, simplifying lock management, and aligning transactional update sequences to prevent deadlocks.

Code reviewJavaconcurrency
0 likes · 12 min read
Code Review of Coupon Claim and Approval Workflow: Issues and Optimization Strategies
Architecture Digest
Architecture Digest
Feb 2, 2025 · Backend Development

UniHttp – A Declarative HTTP Interface Integration Framework for Java

This article introduces UniHttp, a declarative Java HTTP client framework that simplifies third‑party API integration by using annotations to generate request metadata, supports various parameter types, lifecycle hooks, custom processors, and provides practical enterprise‑level examples with full code snippets.

APIDeclarativeHTTP
0 likes · 20 min read
UniHttp – A Declarative HTTP Interface Integration Framework for Java
IT Services Circle
IT Services Circle
Jan 30, 2025 · Backend Development

15 Practical Spring Framework Tips for Developers

This article presents fifteen useful Spring techniques—including bean retrieval, event handling, custom interceptors, retry mechanisms, global exception handling, startup initialization, bean lifecycle methods, resource cleanup, dynamic configuration injection, conditional bean registration, caching, transaction management, bean loading order, AOP aspects, and conditional bean creation—each illustrated with clear Java code examples.

BackendDependencyInjectionJava
0 likes · 17 min read
15 Practical Spring Framework Tips for Developers
Architect's Guide
Architect's Guide
Jan 27, 2025 · Backend Development

Advanced MapStruct Techniques: expression, qualifiedByName, nullValueMappingStrategy, and Decorator

This article introduces MapStruct, a compile‑time Java bean mapping framework, and demonstrates advanced features such as expression‑based mappings, qualifiedByName custom converters, nullValueMappingStrategy handling, and decorator‑based post‑processing with concrete code examples for Spring‑based projects.

Annotation ProcessingJavabean-mapping
0 likes · 6 min read
Advanced MapStruct Techniques: expression, qualifiedByName, nullValueMappingStrategy, and Decorator
Pan Zhi's Tech Notes
Pan Zhi's Tech Notes
Jan 26, 2025 · Backend Development

Mastering Spring Transaction Management: From JDBC to @Transactional

This article explains the fundamentals of transaction handling in Spring Boot, covering both programmatic approaches with PlatformTransactionManager and TransactionTemplate and declarative management using @Transactional, while detailing common pitfalls, propagation and isolation settings, and providing concrete code examples.

Declarative TransactionJDBCProgrammatic Transaction
0 likes · 23 min read
Mastering Spring Transaction Management: From JDBC to @Transactional
Selected Java Interview Questions
Selected Java Interview Questions
Jan 22, 2025 · Backend Development

Implementing Automatic Order Cancellation for Timeout Orders in a Monolithic Backend System

This article explains three backend solutions—database polling with scheduled tasks, JDK DelayQueue, and Netty's HashedWheelTimer—for automatically cancelling unpaid orders after a timeout in a monolithic architecture, detailing their implementation steps, pros, cons, and optimization tips with Java code examples.

DelayQueueHashedWheelTimerJava
0 likes · 11 min read
Implementing Automatic Order Cancellation for Timeout Orders in a Monolithic Backend System
Architect
Architect
Jan 21, 2025 · Backend Development

Refactoring Spring MVC Controllers for Unified Responses and Robust Validation

The article analyzes the role of Spring MVC Controllers, identifies issues with traditional implementations, and demonstrates how to create a unified response structure, automatically wrap results using ResponseBodyAdvice, resolve String conversion problems, and apply JSR‑303 validation with custom rules and global exception handling.

BackendControllerException Handling
0 likes · 22 min read
Refactoring Spring MVC Controllers for Unified Responses and Robust Validation
macrozheng
macrozheng
Jan 17, 2025 · Backend Development

Mastering Spring Event: Avoid Pitfalls and Ensure Reliable Publish‑Subscribe

This article shares hard‑won lessons from production incidents and provides practical guidelines—graceful shutdown, proper startup timing, suitable business scenarios, reliability patterns, and idempotent handling—to use Spring Event safely and effectively in Java backend systems.

BackendEventIdempotence
0 likes · 12 min read
Mastering Spring Event: Avoid Pitfalls and Ensure Reliable Publish‑Subscribe
Architecture Digest
Architecture Digest
Jan 15, 2025 · Backend Development

Advanced Lombok Annotations for Simplifying Java Backend Code

This article demonstrates how Lombok’s advanced annotations such as @RequiredArgsConstructor(onConstructor=@__(@Autowired)), @Delegate, @Cleanup, and the combination of @Builder with @Singular can automatically generate Spring‑compatible constructors, delegate methods, manage resources, and build immutable objects, thereby reducing boilerplate and improving code readability in Java backend development.

Code GenerationJavaLombok
0 likes · 7 min read
Advanced Lombok Annotations for Simplifying Java Backend Code
IT Services Circle
IT Services Circle
Jan 13, 2025 · Backend Development

Compilation of Common Backend Interview Questions and Answers for Small Companies

This article presents a comprehensive collection of written‑test and interview questions covering Java basics, Spring MVC annotations, JVM memory, garbage collection, database design, transaction management, distributed systems, version control, and development workflow, aimed at helping candidates prepare for small‑company technical interviews.

BackendGitJVM
0 likes · 6 min read
Compilation of Common Backend Interview Questions and Answers for Small Companies
Selected Java Interview Questions
Selected Java Interview Questions
Jan 8, 2025 · Backend Development

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

This article explains why Spring Framework discourages field injection with @Autowired, compares constructor, setter, and field injection types, provides code examples for each, and discusses the drawbacks of field injection such as immutability issues, violation of single‑responsibility principle, tight coupling to the container, and hidden dependencies.

AutowiredConstructor InjectionField Injection
0 likes · 8 min read
Understanding Spring Dependency Injection: Constructor, Setter, and Field Injection
Architecture Digest
Architecture Digest
Jan 6, 2025 · Backend Development

Optimizing Large IN Queries with Spring AOP and Multithreaded Splitting

This article explains how to improve performance of massive IN‑list queries in PostgreSQL by splitting the parameter list, executing the sub‑queries concurrently with a custom Spring AOP annotation, and merging the results using a configurable thread pool and return‑handling strategy.

JavaPostgreSQLaop
0 likes · 9 min read
Optimizing Large IN Queries with Spring AOP and Multithreaded Splitting
Top Architect
Top Architect
Jan 2, 2025 · Backend Development

Comprehensive Guide to Spring Utility Classes: Assertions, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ReflectionUtils, and AOP Helpers

This article presents a comprehensive guide to Spring's utility classes—including Assert, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, StreamUtils, ReflectionUtils, and AOP helpers—detailing their purpose, usage patterns, and code examples, while also containing promotional material for related services.

CodeExamplesJavaspring
0 likes · 14 min read
Comprehensive Guide to Spring Utility Classes: Assertions, ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ReflectionUtils, and AOP Helpers
JavaEdge
JavaEdge
Dec 31, 2024 · Backend Development

2024 Java Ecosystem Trends: Adoption, AI Integration, and Emerging Foundations

The 2024 Java trend report analyzes JDK adoption rates, AI tooling, the rise of the Commonhaus Foundation, Spring and Jakarta EE evolution, virtual thread adoption, and community insights, offering guidance for technical leaders and developers planning their future investments.

AICommonhausEcosystem
0 likes · 16 min read
2024 Java Ecosystem Trends: Adoption, AI Integration, and Emerging Foundations
Java Tech Enthusiast
Java Tech Enthusiast
Dec 30, 2024 · Backend Development

The Rise of Java: From Toy to Enterprise Powerhouse

A senior developer recounts switching from C# and Python to Java for web projects and higher pay, illustrating Java’s evolution from a “toy” language with early JVM limits to an enterprise powerhouse driven by JIT, Spring Boot, and robust performance that now rivals C++.

JVMJavaspring
0 likes · 9 min read
The Rise of Java: From Toy to Enterprise Powerhouse
Architecture Digest
Architecture Digest
Dec 29, 2024 · Backend Development

Refactoring Spring MVC Controllers: Unified Return Structure, Response Advice, Parameter Validation, and Global Exception Handling

This article explains how to refactor the Spring MVC controller layer by introducing a unified response format, using ResponseBodyAdvice for automatic wrapping, fixing String conversion issues, applying JSR‑303 validation, creating custom validators, and handling exceptions globally to keep controller code clean and maintainable.

ControllerJavaexceptionhandling
0 likes · 18 min read
Refactoring Spring MVC Controllers: Unified Return Structure, Response Advice, Parameter Validation, and Global Exception Handling
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Dec 29, 2024 · Backend Development

Deep Dive into Spring's @Autowired Annotation: Implementation and Injection Mechanism

This article provides a comprehensive analysis of Spring's @Autowired annotation, explaining its purpose, usage in constructor, field, and method injection, and detailing the underlying bean post‑processor logic, dependency resolution, and candidate selection that enable automatic dependency injection.

AutowiredBeanPostProcessorJava
0 likes · 10 min read
Deep Dive into Spring's @Autowired Annotation: Implementation and Injection Mechanism
Top Architect
Top Architect
Dec 28, 2024 · Backend Development

Building a Netty + WebSocket Message Push Server in Java

This article presents a step‑by‑step guide to building a Netty‑based WebSocket server in Java, covering server initialization, channel configuration, custom handlers, push‑message services, testing procedures, and includes complete source code, while also containing promotional material for unrelated AI services.

JavaMessage PushWebSocket
0 likes · 11 min read
Building a Netty + WebSocket Message Push Server in Java
Architect's Guide
Architect's Guide
Dec 27, 2024 · Backend Development

Fast‑Retry: High‑Performance Asynchronous Retry Framework for Java

Fast‑Retry is a high‑throughput Java retry library that enables asynchronous, non‑blocking retries for massive task volumes, offering programmable and annotation‑based APIs, custom retry policies, and significant performance gains over traditional synchronous frameworks like Spring‑Retry and Guava‑Retry.

BackendJavaRetry
0 likes · 11 min read
Fast‑Retry: High‑Performance Asynchronous Retry Framework for Java
Java Backend Technology
Java Backend Technology
Dec 26, 2024 · Backend Development

Unlock Cleaner Java Code: Master Lombok’s @Delegate, @Cleanup, @Builder & More

Explore how Lombok’s powerful annotations—@onX, @Delegate, @Cleanup, @Singular, and @Builder—can dramatically simplify Java code, enable seamless Spring dependency injection, manage resources automatically, and streamline object construction, while highlighting best practices and potential pitfalls for maintainable backend development.

Code GenerationLombokannotations
0 likes · 8 min read
Unlock Cleaner Java Code: Master Lombok’s @Delegate, @Cleanup, @Builder & More
Architect's Guide
Architect's Guide
Dec 22, 2024 · Backend Development

Cool Request Plugin for IDEA: Tracing, MyBatis Function Tracking, and Custom Timing Features

The article introduces the Cool Request IDEA plugin, explains its tracing capabilities for arbitrary packages, automatic MyBatis function monitoring, customizable timing colors, script-based environment manipulation, and provides a Java code example for handling responses, highlighting its usefulness for backend developers.

BackendIDEAJava
0 likes · 4 min read
Cool Request Plugin for IDEA: Tracing, MyBatis Function Tracking, and Custom Timing Features
Architecture Digest
Architecture Digest
Dec 19, 2024 · Backend Development

Comprehensive Overview of Spring Bean Lifecycle Extension Points

This article explains the Spring container's refresh process, details every extensible hook in a bean's lifecycle—from ApplicationContextInitializer to DisposableBean—provides usage scenarios, and includes complete Java code snippets illustrating how to implement each extension point for custom middleware and application development.

Extension PointsJavaSpring Boot
0 likes · 18 min read
Comprehensive Overview of Spring Bean Lifecycle Extension Points
Top Architect
Top Architect
Dec 12, 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, register synchronization callbacks, and asynchronously send Kafka messages only after a transaction successfully commits, illustrated with a payment‑system example and complete Java code snippets, while also noting thread‑local considerations and promotional offers.

JavaKafkaSpringBoot
0 likes · 12 min read
Using Spring Transaction Hooks to Send Kafka Messages After Transaction Commit
dbaplus Community
dbaplus Community
Dec 8, 2024 · Databases

Why Do JDBC Queries Hang? Understanding Timeout Mechanisms and Fixes

The article explains how JDBC’s setQueryTimeout and Spring’s transaction timeout work, reveals why SQL statements can become indefinitely blocked in the socket read phase, and provides practical configuration steps—including driver URL parameters—to prevent such blocking in MySQL, SQL Server, and Oracle environments.

JDBCTimeoutconnection
0 likes · 11 min read
Why Do JDBC Queries Hang? Understanding Timeout Mechanisms and Fixes
Selected Java Interview Questions
Selected Java Interview Questions
Dec 6, 2024 · Backend Development

Design and Implementation of a Lightweight Data Translation Framework for Java Backend Applications

This article introduces a lightweight, extensible Java framework that uses custom annotations to translate relational data, dictionaries, collections, and nested objects, detailing its background, architecture, core annotation design, usage examples, advanced features, Spring Boot integration, ORM support, and provides the open‑source repository link.

BackendData TranslationFramework
0 likes · 17 min read
Design and Implementation of a Lightweight Data Translation Framework for Java Backend Applications
Architect's Guide
Architect's Guide
Dec 6, 2024 · Backend Development

Why Spring Requires a Three‑Level Cache to Resolve Circular Dependencies Instead of a Two‑Level Cache

This article explains how Spring's bean lifecycle uses a three‑level cache (singletonObjects, earlySingletonObjects, singletonFactories) to break circular dependencies, especially when AOP proxies are involved, and why a two‑level cache alone cannot guarantee correct singleton behavior.

Backend DevelopmentThree-level Cacheaop
0 likes · 10 min read
Why Spring Requires a Three‑Level Cache to Resolve Circular Dependencies Instead of a Two‑Level Cache
Architect
Architect
Dec 3, 2024 · Information Security

How to Secure Third‑Party APIs with AK/SK, Signatures, and Token Strategies

This guide presents a comprehensive design for securing third‑party API calls, covering Access Key/Secret Key generation, permission granularity, timestamp and nonce based replay protection, signature creation and verification, token handling, TLS encryption, rate limiting, logging, and practical Java code examples.

API SecurityAccess KeyJava
0 likes · 28 min read
How to Secure Third‑Party APIs with AK/SK, Signatures, and Token Strategies
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.

Dynamic ConfigurationJavadependency-injection
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.

BackendEvent-Driven ArchitectureJava
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.

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

BackendJavaaccess control
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.

JavaKafkaTransactionSynchronizationManager
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 Framework
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.

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

BackendChain of ResponsibilityHandler
0 likes · 20 min read
Implementing the Chain of Responsibility Pattern for Product Validation in Java
Architecture Digest
Architecture Digest
Nov 13, 2024 · Backend Development

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

This article explains how to replace repetitive try‑catch blocks in Java backend development with a unified exception handling approach using Spring's @ControllerAdvice, custom Assert utilities, and enum‑based error codes, providing cleaner code, consistent error responses, and easy internationalization.

AssertBackendException Handling
0 likes · 20 min read
Unified Exception Handling in Spring Boot Using @ControllerAdvice, Assert, and Enum-based Error Codes
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.

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

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

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

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

Code GenerationJavaLombok
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.

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

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

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

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

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

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

JavaLockconcurrency
0 likes · 21 min read
Does Spring Commit Before Unlock? Unraveling Transaction Timing in High‑Concurrency
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.

BackendExportJava
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 Workflowdesign pattern
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.

ExportQueueFIFOJava
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 DevelopmentJavabean-lifecycle
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.

EventJavaMicroservices
0 likes · 5 min read
Why Spring Event Can Crash Your Service During Shutdown and How to Avoid It