Tagged articles

spring

1855 articles · Page 9 of 19
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 12, 2023 · Backend Development

Mastering Spring Transaction Timeouts: Configurations, Tests, and Internals

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

DatabaseJavaspring
0 likes · 8 min read
Mastering Spring Transaction Timeouts: Configurations, Tests, and Internals
Shepherd Advanced Notes
Shepherd Advanced Notes
Oct 10, 2023 · Backend Development

Master 16 SpringBoot Extension Interfaces for Cleaner, More Elegant Code

This article enumerates and explains sixteen Spring and SpringBoot extension interfaces, illustrates their positions in the bean lifecycle with a call‑order diagram, and provides concrete usage scenarios and code samples so developers can harness these hooks to write more elegant and maintainable applications.

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

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

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

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

How Spring Resolves Circular Dependencies – In‑Depth Interview Guide

This article walks through Spring's three‑level cache mechanism and source‑code flow that break circular dependencies, illustrating each step with a concrete demo, explaining the role of AOP, and showing why each cache level is necessary.

AOPBeanFactoryCircular Dependency
0 likes · 14 min read
How Spring Resolves Circular Dependencies – In‑Depth Interview Guide
Java Architect Essentials
Java Architect Essentials
Oct 6, 2023 · Backend Development

Implementing Order Workflow with Spring Statemachine and Persistent State Storage

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

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

Using Spring WebClient Instead of RestTemplate: Advantages and Code Examples

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

JavaWebClienterror-handling
0 likes · 10 min read
Using Spring WebClient Instead of RestTemplate: Advantages and Code Examples
政采云技术
政采云技术
Sep 28, 2023 · Backend Development

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

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

AOPJavaTransactional
0 likes · 13 min read
Common Scenarios Where Spring @Transactional Fails and How to Avoid Them
Architect
Architect
Sep 26, 2023 · Backend Development

Comprehensive Guide to Spring MVC Annotations and Related Spring Annotations

This article provides a detailed overview of Spring MVC and Spring Boot annotations such as @RequestMapping, @GetMapping, @PostMapping, @RequestBody, @ControllerAdvice, @Component, @Bean, @Scope, @Autowired, and others, explaining their purposes, attributes, usage patterns, and offering practical code examples for each.

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

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

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

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

Creating a Simple Demo with Spring 6 HTTP Interface

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

JavaWebClientbackend
0 likes · 7 min read
Creating a Simple Demo with Spring 6 HTTP Interface
macrozheng
macrozheng
Sep 19, 2023 · Backend Development

Why Spring’s Field Injection Triggers a Warning and Which DI Method Wins

Spring’s @Autowired field injection often shows an IDE warning, prompting developers to compare field, constructor, and setter injection; this article explains each method’s implementation, evaluates reliability, maintainability, testability, flexibility, circular‑dependency detection, and performance, and recommends constructor injection as the preferred approach.

AutowiredConstructor InjectionJava
0 likes · 7 min read
Why Spring’s Field Injection Triggers a Warning and Which DI Method Wins
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 16, 2023 · Backend Development

How Spring Initializes Parent and Child Containers via web.xml

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

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

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

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

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

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

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

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

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

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

CompletableFutureJavaProgrammaticTransaction
0 likes · 19 min read
Ensuring Transaction Consistency in Multi‑Threaded Spring Applications Using CompletableFuture and Programmatic Transactions
Sanyou's Java Diary
Sanyou's Java Diary
Sep 11, 2023 · Backend Development

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

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

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

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

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

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

Mastering Spring Transaction Management: From Basics to Advanced Scenarios

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Getting Started with Spring 6 HTTP Interface: A Complete Demo

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

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

Simplify JWT Token Handling in Spring Using Custom Annotations & ThreadLocal

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

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

Introduction to Spring WebFlux and Reactive Programming

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

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

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

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

JProfileJavaPerformance Optimization
0 likes · 8 min read
Optimizing Startup Time of an Old Dubbo Service Using JProfile and Configuration Tweaks
Su San Talks Tech
Su San Talks Tech
Aug 17, 2023 · Backend Development

Ensuring API Idempotency with Spring, Redis, and Custom Annotations

This article explains the concept of idempotency, identifies which HTTP methods are naturally idempotent, and demonstrates a complete Java Spring solution—including custom annotations, AOP handling, token generation, and Redis storage—to guarantee safe retry and duplicate‑request protection.

AOPAnnotationJava
0 likes · 11 min read
Ensuring API Idempotency with Spring, Redis, and Custom Annotations
Architecture Digest
Architecture Digest
Aug 16, 2023 · Backend Development

Implementing Retry Mechanisms in Java: Manual Loops, Static Proxy, JDK Dynamic Proxy, CGLib, AOP, Spring Retry and Guava‑Retry

This article explains why retry mechanisms are essential for remote service calls, compares several implementation approaches—including manual loops, static and dynamic proxies, AOP, Spring Retry annotations, and Guava‑Retry—provides complete Java code examples, and discusses the advantages and drawbacks of each method.

AOPCGLIBGuava
0 likes · 15 min read
Implementing Retry Mechanisms in Java: Manual Loops, Static Proxy, JDK Dynamic Proxy, CGLib, AOP, Spring Retry and Guava‑Retry
Architect
Architect
Aug 15, 2023 · Backend Development

Mastering Retry Strategies in Java: From Manual Loops to Spring Retry and Guava

This article walks through seven retry implementations for Java services—manual loops, static proxy, JDK dynamic proxy, CGLib proxy, custom AOP, Spring Retry annotations, and Guava‑retry—showing code examples, analyzing their pros and cons, and recommending the best fit for different project contexts.

AOPCGLIBGuava
0 likes · 18 min read
Mastering Retry Strategies in Java: From Manual Loops to Spring Retry and Guava
Selected Java Interview Questions
Selected Java Interview Questions
Aug 15, 2023 · Backend Development

Understanding Conditional Configuration and Profiles in Spring Framework

This article explains Spring's conditional configuration features—including @Profile, @Conditional, and various @ConditionalOn* annotations—showing how to dynamically register beans based on environment, classpath, properties, or other bean presence, with detailed code examples and usage guidelines.

Conditional ConfigurationJavaProfiles
0 likes · 25 min read
Understanding Conditional Configuration and Profiles in Spring Framework
Architect's Guide
Architect's Guide
Aug 11, 2023 · Backend Development

Comprehensive Overview of Java Backend Architecture Topics

This article presents a detailed collection of 31 Java‑related architecture diagrams—including class loader, JVM, Spring, Hibernate, Struts, Android, cloud computing, Linux kernel, and various enterprise frameworks—providing a visual guide for backend developers seeking a broad understanding of Java ecosystem structures.

JVMJavabackend architecture
0 likes · 6 min read
Comprehensive Overview of Java Backend Architecture Topics
Architect
Architect
Aug 9, 2023 · Backend Development

Dynamic Management of SpringBoot @Scheduled Tasks with SuperScheduled

This article explains how to enhance SpringBoot's native @Scheduled tasks with the spring-boot-starter-super-scheduled library, allowing dynamic creation, modification, and cancellation of scheduled jobs at runtime without altering existing annotations, and details the underlying implementation using BeanPostProcessor, CGLIB proxies, and a custom task manager.

AOPCGLIBDynamic Management
0 likes · 14 min read
Dynamic Management of SpringBoot @Scheduled Tasks with SuperScheduled
Architect
Architect
Aug 7, 2023 · Backend Development

How to Build a Clean Unified Exception Handling System in Spring Boot

This article walks through the problem of scattered try‑catch blocks in Java back‑ends, explains the use of Spring's @ControllerAdvice together with a custom Assert‑based validation and error‑code enum, and demonstrates a complete unified exception handling solution with production‑ready response formatting and extensive code examples.

JavaUnified APIassert
0 likes · 25 min read
How to Build a Clean Unified Exception Handling System in Spring Boot
Architecture Digest
Architecture Digest
Aug 4, 2023 · Backend Development

Unified Exception Handling in Spring: Using @ControllerAdvice, Assertions, and Enums for Clean Error Management

The article explains how to replace repetitive try‑catch blocks in Java Spring applications with a unified exception handling mechanism that leverages @ControllerAdvice, custom BaseException, Assert utilities, and enum‑based error codes to produce consistent, environment‑aware error responses.

EnumsExceptionHandlingJava
0 likes · 20 min read
Unified Exception Handling in Spring: Using @ControllerAdvice, Assertions, and Enums for Clean Error Management
JD Cloud Developers
JD Cloud Developers
Aug 3, 2023 · Backend Development

Mastering State Machines: From Theory to Spring and COLA Implementations

This article introduces the fundamentals of state machines, explains the four core concepts, explores domain‑specific languages (DSL) and their classifications, and provides practical Java examples using Spring Statemachine and the COLA framework, ending with a comparison and adoption guidance.

COLADSLJava
0 likes · 18 min read
Mastering State Machines: From Theory to Spring and COLA Implementations
Java Backend Technology
Java Backend Technology
Aug 3, 2023 · Backend Development

Eliminate Java Code Duplication with Design Patterns and Annotations

This article demonstrates how to reduce repetitive Java code in business applications by applying the Template Method and Factory design patterns, leveraging Spring’s IoC for dynamic cart selection, using custom annotations with reflection to serialize API parameters, and employing bean‑mapping utilities to automate DTO‑DO conversions, thereby improving maintainability and scalability.

Javaannotationsreflection
0 likes · 21 min read
Eliminate Java Code Duplication with Design Patterns and Annotations
Architect's Guide
Architect's Guide
Aug 3, 2023 · Backend Development

Robustdb: A Lightweight Client‑Side Read‑Write Splitting Solution for MySQL

This article introduces Robustdb, a compact Java library that implements client‑side read‑write splitting and method‑level routing for MySQL databases, explains its architecture, core code components, dynamic read‑pool allocation strategy, and performance comparison with Atlas, while providing practical implementation details and configuration guidance.

Javadatabase routingread‑write splitting
0 likes · 15 min read
Robustdb: A Lightweight Client‑Side Read‑Write Splitting Solution for MySQL
Architect
Architect
Aug 2, 2023 · Databases

Ensuring Consistency Between MySQL and Redis: Theory, Schemes, and Practical Implementation

This article reviews six theoretical approaches for maintaining MySQL‑Redis data consistency, evaluates their pros and cons, and presents a practical implementation using Java Spring, transactional updates, cache deletion, and asynchronous queue handling to achieve both real‑time and eventual consistency in high‑concurrency systems.

JavaMySQLTransactional
0 likes · 11 min read
Ensuring Consistency Between MySQL and Redis: Theory, Schemes, and Practical Implementation
JavaEdge
JavaEdge
Aug 1, 2023 · Backend Development

Explore IntelliJ IDEA 2023.2: New Profiling, Debugging, and Cloud Tools

IntelliJ IDEA 2023.2 introduces a suite of enhancements—including a Run‑window profiler, inline return breakpoints, automatic test reruns for Gradle/Maven/JPS, WSL‑based Tomcat debugging, TLS‑enabled gRPC requests, Swagger and OpenAPI support, shared index generation, and numerous UI and code‑completion upgrades—streamlining Java development workflows.

DebuggingIntelliJ IDEAJava
0 likes · 12 min read
Explore IntelliJ IDEA 2023.2: New Profiling, Debugging, and Cloud Tools
Shepherd Advanced Notes
Shepherd Advanced Notes
Jul 31, 2023 · Backend Development

How Spring Uses AOP to Implement Transaction Management

This article explains why transaction control is essential for database‑backed applications, compares native JDBC/MyBatis handling with Spring's unified approach, details the core transaction APIs, and walks through the AOP‑based mechanism—including @EnableTransactionManagement, proxy generation, and CGLIB interception—that automatically opens, commits, and rolls back transactions at runtime.

AOPCGLIBPlatformTransactionManager
0 likes · 20 min read
How Spring Uses AOP to Implement Transaction Management
Shepherd Advanced Notes
Shepherd Advanced Notes
Jul 24, 2023 · Backend Development

Understanding the Core Principles of Spring AOP Aspect Programming

This article explains how Spring AOP integrates AspectJ using CGLIB or JDK dynamic proxies, walks through a complete logging aspect example, and details the internal registration, proxy creation, and invocation processes that enable cross‑cutting concerns without modifying business code.

AOPAspectJCGLIB
0 likes · 15 min read
Understanding the Core Principles of Spring AOP Aspect Programming
Selected Java Interview Questions
Selected Java Interview Questions
Jul 21, 2023 · Backend Development

Using Lombok @RequiredArgsConstructor to Replace @Autowired and @Resource for Spring Dependency Injection

This article explains how Lombok's @RequiredArgsConstructor can replace multiple @Autowired and @Resource annotations by promoting constructor injection, compares field, constructor, and setter injection in Spring, and demonstrates the resulting cleaner code with practical examples.

Constructor InjectionJavaLombok
0 likes · 6 min read
Using Lombok @RequiredArgsConstructor to Replace @Autowired and @Resource for Spring Dependency Injection
Code Ape Tech Column
Code Ape Tech Column
Jul 21, 2023 · Backend Development

Implementing Distributed WebSocket Messaging with Redis and Kafka in Spring

This article explains how to enable cross‑node WebSocket communication in a distributed Spring application by publishing messages to a Redis or Kafka topic, tracking user connections, and routing messages to the appropriate server instance, complete with full code examples and configuration details.

Distributed MessagingKafkabackend development
0 likes · 16 min read
Implementing Distributed WebSocket Messaging with Redis and Kafka in Spring
Programmer DD
Programmer DD
Jul 18, 2023 · Backend Development

Explore the Best Spring I/O 2023 Talks: Must‑Watch Videos for Modern Java Developers

This article curates the most valuable Spring I/O 2023 video sessions—covering the latest Java version adaptations, Spring Framework and Boot innovations, cloud‑native deployments, security, observability, and architectural best practices—providing concise Chinese summaries so developers can quickly identify which talks merit deeper viewing.

Javabackend developmentcloud native
0 likes · 24 min read
Explore the Best Spring I/O 2023 Talks: Must‑Watch Videos for Modern Java Developers
Code Ape Tech Column
Code Ape Tech Column
Jul 17, 2023 · Backend Development

Best Practices and Common Pitfalls When Using Java Thread Pools

This article summarizes the key pitfalls and recommended practices for creating, configuring, monitoring, and naming Java thread pools, including proper declaration, parameter tuning for CPU‑ and I/O‑bound workloads, avoiding OOM and deadlocks, and leveraging dynamic pool frameworks.

BestPracticesJavaPerformance
0 likes · 17 min read
Best Practices and Common Pitfalls When Using Java Thread Pools
Programmer DD
Programmer DD
Jul 17, 2023 · Backend Development

Master Spring 6.1 RestClient: Simple HTTP Calls, Error Handling, and Advanced Exchange

This article introduces Spring 6.1’s new synchronous RestClient, showing how to perform basic GET and POST requests, convert responses to objects, handle errors with onStatus, and use the advanced exchange method for custom request‑response processing, positioning RestClient as a modern replacement for RestTemplate.

JavaRestClientbackend development
0 likes · 6 min read
Master Spring 6.1 RestClient: Simple HTTP Calls, Error Handling, and Advanced Exchange
Su San Talks Tech
Su San Talks Tech
Jul 11, 2023 · Backend Development

Why MyBatis‑Plus’s saveBatch Triggers Unexpected Transaction Rollbacks and How to Fix It

The article explains why the error "Transaction rolled back because it has been marked as rollback‑only" occurs in a Java Spring service when using MyBatis‑Plus saveBatch, how hidden @Transactional annotations cause hidden nested transactions, and presents a practical workaround by replacing the batch operation with a custom mapper.

JavaMyBatis-PlusRollback
0 likes · 7 min read
Why MyBatis‑Plus’s saveBatch Triggers Unexpected Transaction Rollbacks and How to Fix It
Java High-Performance Architecture
Java High-Performance Architecture
Jul 9, 2023 · Backend Development

Master Spring Assert & Utility Classes: Essential Java Backend Tools

This article provides a comprehensive overview of Spring’s Assert utilities and a wide range of Spring Framework helper classes—including ObjectUtils, StringUtils, CollectionUtils, FileCopyUtils, ResourceUtils, StreamUtils, ReflectionUtils, and AOP utilities—detailing their purpose and key method signatures for Java backend development.

AOPJavaUtility
0 likes · 13 min read
Master Spring Assert & Utility Classes: Essential Java Backend Tools
Su San Talks Tech
Su San Talks Tech
Jul 2, 2023 · Fundamentals

Master Design Patterns: Chain, Template, Pub/Sub & Strategy in Java

This article explains the concepts, advantages, disadvantages, and real-world use cases of four essential design patterns—Chain of Responsibility, Template Method, Publish‑Subscribe, and Strategy—providing detailed Java and Spring code examples to help developers apply them effectively.

Design PatternsJavaSoftware Architecture
0 likes · 41 min read
Master Design Patterns: Chain, Template, Pub/Sub & Strategy in Java
Selected Java Interview Questions
Selected Java Interview Questions
Jun 30, 2023 · Backend Development

Implementing Rate Limiting in Java with Guava, Custom Annotations, and Redis Lua Scripts

This article explains how to protect high‑concurrency Java applications using rate‑limiting techniques, covering basic algorithms such as counter, leaky‑bucket and token‑bucket, demonstrating a single‑node implementation with Guava’s RateLimiter and custom annotations, and showing a distributed solution based on Redis and Lua scripts.

GuavaJavaRedis
0 likes · 15 min read
Implementing Rate Limiting in Java with Guava, Custom Annotations, and Redis Lua Scripts
Code Ape Tech Column
Code Ape Tech Column
Jun 30, 2023 · Backend Development

Applying the Service Locator Pattern to Decouple File Parsers in Spring

This article demonstrates how to replace tightly‑coupled if‑else or switch‑case parser selection with the Service Locator Pattern in a Spring Java application, enabling easy addition of new file‑type parsers without modifying client code and adhering to the open‑closed principle.

DecouplingDesign PatternJava
0 likes · 8 min read
Applying the Service Locator Pattern to Decouple File Parsers in Spring
Programmer DD
Programmer DD
Jun 27, 2023 · Backend Development

When to Choose @Autowired vs @Resource in Spring? A Deep Dive

This article compares Spring's @Autowired and JDK's @Resource annotations, detailing their injection mechanisms, parameter differences, default behaviors, and usage scopes with code examples, while also offering interview advice and promoting a Java interview guide.

AutowiredJavaResource
0 likes · 21 min read
When to Choose @Autowired vs @Resource in Spring? A Deep Dive
Selected Java Interview Questions
Selected Java Interview Questions
Jun 25, 2023 · Backend Development

Ensuring Transaction Consistency in Multi‑threaded Spring Applications Using Programmatic Transactions

This article explains how to execute two dependent tasks in parallel with CompletableFuture, why the usual @Transactional annotation fails in a multi‑threaded environment, and provides a programmatic transaction solution that copies Spring's transaction resources between threads to guarantee atomic commit or rollback across all parallel operations.

CompletableFutureProgrammatic TransactionTransaction Management
0 likes · 19 min read
Ensuring Transaction Consistency in Multi‑threaded Spring Applications Using Programmatic Transactions
Architect
Architect
Jun 22, 2023 · Backend Development

Understanding Spring’s Core Concepts: IoC, DI, AOP and Bean Management

The article explains how Spring’s IoC container, dependency injection, singleton beans, and AOP simplify Java backend development by abstracting object creation, configuration, and cross‑cutting concerns, illustrated with code examples and practical scenarios such as conditional bean loading and Redis client selection.

AOPIoCJava
0 likes · 12 min read
Understanding Spring’s Core Concepts: IoC, DI, AOP and Bean Management
21CTO
21CTO
Jun 20, 2023 · Backend Development

Mastering Spring State Machine: Build Robust Order Workflows with Persistence

This article introduces the fundamentals of finite state machines, explains their four core concepts, demonstrates how to model order workflows with state diagrams, and provides a comprehensive guide to implementing, configuring, persisting, and testing Spring Statemachine in a Java backend, including solutions for exception handling and AOP enhancements.

AOPPersistenceWorkflow
0 likes · 23 min read
Mastering Spring State Machine: Build Robust Order Workflows with Persistence
Top Architect
Top Architect
Jun 20, 2023 · Backend Development

Eight Ways to Implement Asynchronous Programming in Java

This article introduces eight practical approaches for achieving asynchronous execution in Java—including raw threads, Future, CompletableFuture, Spring @Async, ApplicationEvent, message queues, Hutool ThreadUtil, and Guava ListenableFuture—providing code samples, configuration tips, and discussion of each method's advantages and drawbacks.

AsynchronousCompletableFutureFuture
0 likes · 14 min read
Eight Ways to Implement Asynchronous Programming in Java
Selected Java Interview Questions
Selected Java Interview Questions
Jun 15, 2023 · Backend Development

How Spring IOC Reduces Coupling: From Direct Instantiation to Interfaces, Factory Method, and Reflection

This article explains the concept of coupling, demonstrates how traditional object creation leads to high coupling, and shows how using interfaces, the factory pattern, and reflection—culminating in Spring IOC—can dramatically lower coupling, improve reuse, and simplify maintenance in Java backend development.

CouplingFactory PatternIoC
0 likes · 8 min read
How Spring IOC Reduces Coupling: From Direct Instantiation to Interfaces, Factory Method, and Reflection
Programmer DD
Programmer DD
Jun 14, 2023 · Backend Development

Mastering Spring Property Injection: From XML to SpEL

This article provides a comprehensive guide to Spring's property injection techniques, covering setter and constructor injection using both XML and Java annotations, external configuration with @PropertySource, and advanced SpEL expressions, complete with runnable code examples and output screenshots.

JavaSpELXML
0 likes · 27 min read
Mastering Spring Property Injection: From XML to SpEL
Efficient Ops
Efficient Ops
Jun 13, 2023 · Operations

How to Automate Batch Job Retries and Eliminate Midnight Outages

This article explores a real‑world scenario where a support manager faces nightly batch job interruptions, analyzes common database and environment failures, and presents a systematic redesign of the batch framework and executor to enable automatic retry, reducing manual intervention and improving operational reliability.

Batch ProcessingMySQLexception handling
0 likes · 7 min read
How to Automate Batch Job Retries and Eliminate Midnight Outages
Shepherd Advanced Notes
Shepherd Advanced Notes
Jun 12, 2023 · Backend Development

How Spring Solves Circular Bean Dependencies with a Three‑Level Cache

The article explains Spring's three‑level cache mechanism for resolving singleton circular bean dependencies, walks through bean lifecycle stages, compares field, setter and constructor injection, shows configuration to enable circular references, and details the internal code paths that expose early bean references.

Bean LifecycleCircular DependencyThree-level Cache
0 likes · 17 min read
How Spring Solves Circular Bean Dependencies with a Three‑Level Cache
Cognitive Technology Team
Cognitive Technology Team
Jun 11, 2023 · Backend Development

Unified Handling of ThreadLocal Issues in Java Projects

This article explains why ThreadLocal can cause information loss, corruption, or OOM in Java applications and presents two practical approaches—Java agent bytecode manipulation and proxy‑based thread‑pool wrappers—along with concrete Spring Sleuth implementations and testing results to ensure safe propagation and cleanup.

AOPJavaThreadLocal
0 likes · 5 min read
Unified Handling of ThreadLocal Issues in Java Projects
Architecture Digest
Architecture Digest
Jun 7, 2023 · Backend Development

Why IntelliJ IDEA Warns on @Autowired Field Injection but Not on @Resource

The article explains the differences between Spring's @Autowired and @Resource annotations, outlines the pros and cons of various dependency injection methods, and clarifies why IntelliJ IDEA issues a warning for field injection with @Autowired while treating @Resource as acceptable, emphasizing portability and coupling concerns.

AutowiredIDEAJava
0 likes · 5 min read
Why IntelliJ IDEA Warns on @Autowired Field Injection but Not on @Resource
Architecture Digest
Architecture Digest
Jun 3, 2023 · Backend Development

PowerJob: A Next‑Generation Distributed Task Scheduling and Computing Framework – Features, Comparison, and Quick‑Start Guide

PowerJob is a modern distributed job scheduling framework that addresses the limitations of Quartz, XXL‑Job and SchedulerX by offering a web UI, rich scheduling strategies, DAG workflow support, lock‑free high‑performance scheduling, multiple processor types and step‑by‑step quick‑start instructions for developers.

JavaMapReducePowerJob
0 likes · 10 min read
PowerJob: A Next‑Generation Distributed Task Scheduling and Computing Framework – Features, Comparison, and Quick‑Start Guide
Programmer DD
Programmer DD
May 31, 2023 · Backend Development

8 Powerful Ways to Implement Asynchronous Execution in Java

This article explains what asynchronous execution is, compares it with synchronous processing, and presents eight practical Java implementations—including raw threads, Future, CompletableFuture, Spring @Async, ApplicationEvent, message queues, Hutool ThreadUtil, and Guava ListenableFuture—complete with code samples and usage tips.

AsynchronousCompletableFutureFuture
0 likes · 14 min read
8 Powerful Ways to Implement Asynchronous Execution in Java
Cognitive Technology Team
Cognitive Technology Team
May 21, 2023 · Backend Development

Concurrency Safety Issues Caused by AOP Object Escape and Incorrect Advice Order in Spring

This article explains how improper use of AOP in Spring can cause object escape leading to concurrency safety problems, discusses issues such as asynchronous thread modifications, caching, and incorrect advice ordering with @Transaction, @Retryable, and dynamic datasource switching, and provides practical guidance to avoid these pitfalls.

AOPJavaObject Escape
0 likes · 5 min read
Concurrency Safety Issues Caused by AOP Object Escape and Incorrect Advice Order in Spring