Tagged articles
ThreadPoolTaskExecutor
18 articles · Page 1 of 1
The article identifies seven common performance killers in Spring Boot production—N+1 queries, unbounded thread pools, excessive logging, oversized response bodies, missing indexes, synchronous external API calls, and serial API invocations—and provides concrete code‑level solutions such as eager fetching, custom thread pools, lazy logging, DTOs, index creation, timeout configuration, and CompletableFuture parallelism.
CompletableFutureDTOLogging
0 likes · 10 min read

This article details Spring Boot @Async production pitfalls including unbounded thread creation, context loss, swallowed exceptions, and OOM risks, then provides concrete solutions: explicit ThreadPoolTaskExecutor configuration with bounded queues, TaskDecorator for MDC/TraceId/SecurityContext propagation, global exception handling, CompletableFuture orchestration without blocking, and monitoring with dynamic tuning to prevent thread leaks and OOM.
CompletableFutureContext PropagationJava Concurrency
0 likes · 19 min read

The article explains why @Async, the most used async solution in SpringBoot, often causes OOM, missing trace IDs, silent failures, and task avalanches, and then walks through the underlying AOP mechanism, thread‑pool choices, timeout handling, context propagation, transaction interactions, monitoring, and dynamic tuning.
CompletableFutureMDCSpringBoot
0 likes · 13 min read

This article demonstrates how to boost the insertion speed of over two million records in a PostgreSQL database by configuring a Spring Boot ThreadPoolTaskExecutor for multithreaded batch processing, detailing the setup, code implementation, performance testing, and analysis of results.
BatchInsertMultithreadingPerformanceTesting
0 likes · 6 min read

The article demonstrates how to avoid blocking SpringBoot services during massive Excel exports by splitting data, using CompletableFuture with a ThreadPoolTaskExecutor to generate multiple Excel files concurrently via EasyExcel, then compressing them into a ZIP for client download, including full code and resource‑cleanup details.
CompletableFutureConcurrent ExportEasyExcel
0 likes · 9 min read

This guide explains how to enable and use Spring Boot's @Async and @Scheduled annotations, configure various TaskExecutor and TaskScheduler implementations, leverage new Spring 6.1 pause/resume and virtual‑thread features, and apply graceful shutdown for both asynchronous and scheduled jobs.
AsyncSpring 6.1Spring Boot
0 likes · 10 min read


JavaEdgeSep 5, 2024 · Backend Development
This article explains how Spring Boot automatically configures a ThreadPoolTaskExecutor for @Async and @Scheduled, shows the default parameters introduced in version 2.1, demonstrates how to inspect and customize them, compares the default executor with SimpleAsyncTaskExecutor, and provides code examples for using @Async, injecting the executor, and defining a custom thread pool to avoid resource‑exhaustion issues.
AsyncSpring BootTaskExecutionAutoConfiguration
0 likes · 18 min read

This article demonstrates how to boost the insertion speed of over two million records by using Spring Boot with MyBatis‑Plus, a ThreadPoolTaskExecutor for multithreaded batch inserts, and detailed performance testing that shows a reduction from 5.75 minutes to 1.67 minutes.
MultithreadingPostgreSQLSpring Boot
0 likes · 6 min read

This article demonstrates how to boost the performance of inserting over two million records by configuring a ThreadPoolTaskExecutor in a Spring Boot application, providing detailed implementation code, test results comparing multithreaded and single‑threaded approaches, and practical recommendations for optimal thread pool sizing.
BatchInsertPerformanceTestingPostgreSQL
0 likes · 6 min read

This article demonstrates how to boost the insertion speed of over two million records by configuring a Spring Boot ThreadPoolTaskExecutor, integrating it with MyBatis‑Plus and PostgreSQL, and measuring multi‑threaded versus single‑threaded performance to determine the optimal thread count.
MultithreadingMyBatis PlusPostgreSQL
0 likes · 5 min read

This article explains how to configure Spring Boot's built‑in ThreadPoolTaskExecutor, customize its core parameters, and use it together with Java 8 CompletableFuture to run asynchronous tasks, including a performance comparison with a synchronous implementation.
CompletableFutureJavaSpring Boot
0 likes · 6 min read

This article explains how to enable and configure Spring Boot's @Async annotation, provides code examples for thread‑pool setup and asynchronous service methods, and discusses important caveats such as calling async methods from the same class, transaction incompatibility, blocking issues, and exception handling.
BackendJavaSpring Boot
0 likes · 12 min read

This article demonstrates how to boost the insertion speed of over two million records by configuring Spring Boot's ThreadPoolTaskExecutor for multithreaded batch inserts, detailing the setup, code implementation, performance testing, and analysis of results.
MultithreadingPostgreSQLSpring Boot
0 likes · 6 min read

This article demonstrates how to boost the efficiency of inserting millions of records by configuring a ThreadPoolTaskExecutor in Spring Boot 2.1.1, using MyBatis‑Plus and PostgreSQL, providing code examples, performance test results, and best‑practice recommendations for multithreaded batch insertion.
BatchInsertMybatisPlusPostgreSQL
0 likes · 7 min read

This article explains the seven essential configuration parameters of Java's ThreadPoolTaskExecutor, covering thread creation, core and maximum pool sizes, keep‑alive policies, work queues, thread factories, rejection handlers, and practical usage tips with code examples and common pitfalls.
Best PracticesConcurrencyJava
0 likes · 10 min read

This article explains how to configure and use Spring Boot's ThreadPoolTaskExecutor for asynchronous service methods, shows the required @Configuration and @EnableAsync annotations, demonstrates custom thread‑pool monitoring by extending ThreadPoolTaskExecutor, and provides complete code snippets and log examples.
AsyncJavaSpring Boot
0 likes · 12 min read

This article explains how to configure a Spring Boot ThreadPoolTaskExecutor, enable asynchronous execution with @Async, create a custom visible executor to log pool statistics, and demonstrates the complete workflow with code examples and runtime logs for improving database insert performance.
ConcurrencyJavaSpring Boot
0 likes · 12 min read

This article demonstrates how to configure and use Spring Boot's ThreadPoolTaskExecutor for asynchronous processing, shows custom thread‑pool monitoring, and provides complete code snippets and log examples to help improve batch‑insert performance in Java backend applications.
ConcurrencyJavaSpring Boot
0 likes · 12 min read
