Tagged articles
ExceptionHandling
87 articles · Page 1 of 1
This article explains why Spring's @Async annotation causes transaction rollback failures, MDC traceId loss in async threads, and silent exception swallowing, then provides production-ready solutions including separate service classes, TaskDecorator for MDC propagation, custom AsyncUncaughtExceptionHandler, and proper thread pool configuration.
AOPBackendExceptionHandling
0 likes · 26 min read


java1234Apr 30, 2026 · Backend Development
The article explains how to refactor Spring controller code by introducing a unified response structure, using ResponseBodyAdvice for automatic wrapping, fixing String conversion issues through message‑converter ordering, applying JSR‑303 validation (including custom validators), and implementing custom exceptions with a global exception handler, resulting in concise, maintainable backend APIs.
ControllerExceptionHandlingResponseBodyAdvice
0 likes · 18 min read

The article demonstrates how to eliminate repetitive try‑catch blocks in Java Spring applications by using Spring's @ControllerAdvice for centralized exception handling, a custom Assert interface backed by enums for error codes, and unified response objects, resulting in cleaner, more maintainable code.
EnumExceptionHandlingJava
0 likes · 22 min read

This article walks through SpringBoot's built‑in scheduling, comparing static @Scheduled tasks with dynamic Trigger‑based jobs, covering configuration, cron syntax, thread‑pool setup, async execution, runtime cron updates, exception handling, and practical best‑practice recommendations for production systems.
DynamicSchedulingExceptionHandlingScheduledTasks
0 likes · 14 min read

The article explains how Java's thread pool silently consumes exceptions when using submit(), shows a minimal reproducible example, reveals where the exception is stored, and offers three practical ways to surface or handle those hidden errors.
ConcurrencyExceptionHandlingFutureTask
0 likes · 7 min read

When a Spring @Transactional method with REQUIRES_NEW fails to persist audit logs after a rollback, the issue often stems from misconfigured rollback rules, caught exceptions, self‑invocation, non‑public or final methods, or incorrect propagation settings, all of which prevent the new transaction from committing.
@TransactionalExceptionHandlingJava
0 likes · 7 min read

This article explains why tasks submitted to a Java ThreadPool via submit silently swallow exceptions while execute prints them, and demonstrates three practical ways—using Future.get(), a custom UncaughtExceptionHandler, and overriding afterExecute—to reliably capture and process those exceptions.
ExceptionHandlingExecutorServiceFuture
0 likes · 14 min read

This article explains why tasks submitted with ExecutorService.submit silently swallow exceptions while execute prints them, and demonstrates three practical ways—try‑catch, Thread.setDefaultUncaughtExceptionHandler, and overriding afterExecute—to reliably retrieve exception information from a Java thread pool.
ExceptionHandlingExecutorServiceFuture
0 likes · 14 min read

Spring’s @Transactional annotation often appears simple, yet it can silently fail due to unnecessary usage, scope issues, proxy limitations, propagation settings, exception handling, and bean management, leading to unexpected non‑rollback behavior; this article categorizes thirteen common pitfalls and demonstrates each with concrete code examples.
AOPExceptionHandlingJava
0 likes · 18 min read

This article explains why the Controller layer remains essential in modern Spring applications, identifies common problems such as tangled validation and inconsistent responses, and demonstrates how to introduce a unified result structure, use ResponseBodyAdvice for automatic wrapping, fix String conversion issues, apply JSR‑303 validation, create custom validators, and handle exceptions uniformly.
ControllerExceptionHandlingResponseBodyAdvice
0 likes · 22 min read

This article walks through the ten most useful Spring extension points—including global exception handling, custom interceptors, bean access, @Import usage, startup runners, BeanDefinition modification, initialization callbacks, BeanPostProcessor hooks, destroy callbacks, and custom scopes—providing clear explanations and ready‑to‑use code examples for each.
BackendBeanFactoryBeanPostProcessor
0 likes · 17 min read

This article shows how to refactor SpringBoot controller code by introducing a unified Result wrapper, ResponseBodyAdvice, proper HttpMessageConverter ordering, JSR‑303 validation (including custom validators), and centralized exception handling, resulting in concise, maintainable backend code with consistent API responses.
ControllerExceptionHandlingResponseBodyAdvice
0 likes · 17 min read


Java OneJul 9, 2025 · Backend Development
This tutorial walks through the core concepts of Spring Alibaba Sentinel, covering its architecture, resource and rule management, step‑by‑step integration into Spring Cloud projects, flow‑control configuration, custom exception handling with @SentinelResource, and advanced OpenFeign support, all illustrated with code snippets and diagrams.
ExceptionHandlingFlowControlJava
0 likes · 15 min read

This article explains the essential responsibilities of a Spring MVC controller, identifies common pitfalls such as duplicated validation and inconsistent responses, and demonstrates how to unify response structures, handle String conversion issues, apply JSR‑303 validation, create custom validators, and implement centralized exception handling using ResponseBodyAdvice and @RestControllerAdvice.
ControllerExceptionHandlingResponseBodyAdvice
0 likes · 17 min read

This article explains how to efficiently handle exceptions in Spring Boot applications by using @ControllerAdvice and @ExceptionHandler annotations, providing step-by-step code examples for custom global exception classes, error response structures, and handling specific exceptions such as business, null pointer, and type conversion errors.
AnnotationsBackendExceptionHandling
0 likes · 9 min read

This article presents a comprehensive guide to implementing full‑chain log tracing, unified exception handling, permission interception, request latency monitoring, and standardized log formats in enterprise‑level Java projects using Spring AOP, thread‑local context, and Redis caching.
AOPExceptionHandlingLogging
0 likes · 23 min read

The article explains how SpringBoot's @ResponseStatus annotation can automatically set HTTP response status codes for methods and custom exceptions, reducing boilerplate code, improving maintainability, and offering flexible error handling, with practical examples and best‑practice guidelines.
ExceptionHandlingHTTPJava
0 likes · 7 min read

This article explains how to refactor Spring MVC controllers by introducing a unified response wrapper, using ResponseBodyAdvice for automatic packaging, handling String conversion issues, applying JSR‑303 validation for request parameters, creating custom validators, and defining centralized exception handling to keep controller code clean and maintainable.
ControllerExceptionHandlingJava
0 likes · 17 min read

This article explains how to implement unified global exception handling in SpringBoot by using @ControllerAdvice with @ExceptionHandler, defining a base error interface, custom enums, exception classes, and a standardized response wrapper, while also providing test code examples and best‑practice recommendations.
CustomExceptionExceptionHandlingGlobalException
0 likes · 10 min read

This article introduces the advantages of Java's CompletableFuture and systematically outlines six common pitfalls—including default thread‑pool issues, exception handling, timeout management, thread‑local context loss, callback hell, and task‑ordering problems—while providing correct code examples and best‑practice recommendations.
CompletableFutureExceptionHandlingJava
0 likes · 10 min read

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

This article explains why tasks submitted with ExecutorService.submit hide exceptions while execute prints them, demonstrates how Future.get() can retrieve hidden errors, and presents three practical solutions—inline try‑catch, a custom ThreadFactory with UncaughtExceptionHandler, and overriding afterExecute—to reliably handle thread‑pool exceptions in Java.
ConcurrencyExceptionHandlingExecutorService
0 likes · 15 min read

The article presents a step‑by‑step guide to refactor Spring MVC controller code by unifying response formats, applying a global response wrapper, enforcing parameter validation with JSR‑303, and handling custom exceptions through a centralized advice, all illustrated with complete Java examples.
ControllerExceptionHandlingJava
0 likes · 18 min read

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.
ControllerExceptionHandlingJava
0 likes · 18 min read

This article explains how Java 8’s @FunctionalInterface, together with Supplier, Consumer, Runnable and Function types, can be used to eliminate repetitive if…else statements, handle exceptions, branch logic, and present‑or‑else scenarios, providing cleaner and more expressive backend code.
ExceptionHandlingFunctionalInterfaceJava
0 likes · 8 min read

This article examines how Java's ExecutorService thread pool reacts when a task throws an uncaught exception, comparing the behaviors of execute and submit methods, analyzing source code, and summarizing the impact on thread removal, creation, and exception retrieval.
ConcurrencyExceptionHandlingExecutorService
0 likes · 7 min read

This article examines common problems in Spring Boot controller implementations—excessive try‑catch blocks, inline validation, and business logic leakage—and demonstrates how to refactor them using @Valid, assertion utilities, and a global exception handler to achieve concise, maintainable backend code.
BackendControllerExceptionHandling
0 likes · 9 min read

The article examines common pitfalls in Spring Boot controller implementations—excessive try‑catch blocks, inline validation, and business logic—then demonstrates how to refactor them into clean, maintainable code using @Valid annotations, reduced duplication, and a centralized global exception handler.
ControllerExceptionHandlingSpringBoot
0 likes · 8 min read

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.
@TransactionalAOPBackend
0 likes · 20 min read

This article walks through creating a Spring Boot project, handling version compatibility between Spring Cloud, Spring Boot, and Kafka, demonstrates common Maven configurations, provides global exception handling and logging aspects, and lists useful backend tools such as embedded Redis, MyBatis‑Plus, and Redisson.
ExceptionHandlingJavaMaven
0 likes · 13 min read

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.
BackendControllerExceptionHandling
0 likes · 18 min read

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.
@TransactionalAOPExceptionHandling
0 likes · 20 min read

This article explains the most frequent SpringBoot BeanCreationException scenarios—including missing beans, duplicate beans, constructor issues, circular dependencies, and bean overriding—provides clear code examples, and offers practical solutions to resolve each problem.
BeanCreationExceptionDependencyInjectionExceptionHandling
0 likes · 7 min read

This article explains why exceptions thrown by tasks submitted to a Java thread pool behave differently with submit and execute, demonstrates how to capture those exceptions using Future.get, try‑catch, Thread.setDefaultUncaughtExceptionHandler, and by overriding afterExecute, and provides complete code examples for each approach.
ConcurrencyExceptionHandlingExecutorService
0 likes · 13 min read

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.
BackendControllerExceptionHandling
0 likes · 21 min read

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

The article critiques overly complex Spring Boot controllers filled with repetitive validation and business logic, demonstrates cleaner implementations using @Valid, Assert, and global exception handling, and provides practical code examples and guidelines for building maintainable backend controllers.
@ValidBackendExceptionHandling
0 likes · 10 min read

This tutorial explains how to implement a standardized response format and a global exception handling mechanism in Spring Boot 3, providing reusable code examples, status enums, controller advice, and best‑practice guidelines to improve code consistency, readability, and maintainability across backend projects.
APIExceptionHandlingSpringBoot
0 likes · 10 min read

This article explains how to build a clean, maintainable Controller layer in Java Spring by separating responsibilities, using unified response structures, applying ResponseBodyAdvice for automatic wrapping, implementing parameter validation with JSR‑303, and handling custom exceptions through centralized advice, illustrated with comprehensive code examples.
ControllerExceptionHandlingJava
0 likes · 15 min read

This article provides an in‑depth tutorial on Java's BigDecimal class, covering its purpose, common constructors, essential arithmetic methods, comparison techniques, formatting with NumberFormat, handling of division exceptions, and a utility class offering precise add, subtract, multiply, divide, rounding, and comparison operations.
ArithmeticExceptionHandlingFormatting
0 likes · 16 min read

A mis‑handled exception in a ScheduledExecutorService can silently halt the entire scheduled thread pool, causing critical periodic jobs to stop; this article explains the underlying delay‑queue and thread‑pool mechanics, shows reproducible code, and provides practical safeguards to keep scheduled tasks alive.
DelayQueueExceptionHandlingJava
0 likes · 9 min read

Learn how to use Spring's @ControllerAdvice, @ExceptionHandler, @InitBinder, and @ModelAttribute annotations to implement global exception handling, data binding, and pre-processing, including custom exceptions, order control with @Order, and practical code examples for robust backend development.
@ControllerAdviceDataBindingExceptionHandling
0 likes · 12 min read


JD TechApr 15, 2024 · Backend Development
This article investigates how Java's java.util.concurrent.ExecutorService thread pools react to exceptions when tasks are submitted via execute versus submit, providing source‑code experiments, observed outcomes, and a detailed analysis of the underlying JDK implementation.
ConcurrencyExceptionHandlingExecutorService
0 likes · 8 min read

Learn how to configure Spring Boot 2.7.16 for unified API prefixes, custom static resource locations, annotation‑based and custom parameter validation, global exception handling, request inspection via HttpEntity, CORS filtering, custom error pages, and reliable ServletContext access using ApplicationListener.
CORSConfigurationExceptionHandling
0 likes · 7 min read

This article explains why exceptions from tasks submitted to a Java ThreadPool using submit are not printed, how execute shows them, and presents three practical approaches—try‑catch within the task, a custom Thread.setDefaultUncaughtExceptionHandler, and overriding afterExecute—to reliably obtain and handle those exceptions.
ConcurrencyExceptionHandlingExecutorService
0 likes · 14 min read

This article introduces Java 8 functional interfaces—including Function, Supplier, Consumer, and Runnable—explains their signatures, demonstrates how they can replace traditional if‑else statements for exception handling, branch processing, and null checks, and provides concrete code examples and usage tips.
BackendExceptionHandlingFunctionalInterface
0 likes · 7 min read

This article explains how positioning a try‑catch block either inside or outside a Java for loop changes exception handling behavior, performance impact, and when to choose each approach based on business requirements.
ExceptionHandlingJavafor-loop
0 likes · 5 min read

This article explains Java's Future and CompletableFuture APIs, demonstrates how to replace blocking Future.get() and CountDownLatch patterns with CompletableFuture, shows creation methods, result retrieval options, callback chains, exception handling, task composition techniques, and provides best‑practice recommendations for thread‑pool usage.
CompletableFutureConcurrencyExceptionHandling
0 likes · 22 min read

This article examines the pitfalls of using SpringBoot's @ControllerAdvice and @ExceptionHandler for global exception handling, illustrates common issues across controller, service, and data layers, and proposes more precise logging and debugging strategies to improve error traceability and maintainability.
BackendDebuggingExceptionHandling
0 likes · 7 min read

This article explains why exceptions submitted to a Java ThreadPool via submit are not printed, how to retrieve them using Future.get(), and presents three practical solutions—including try‑catch, Thread.setDefaultUncaughtExceptionHandler, and overriding afterExecute—to reliably capture and process thread pool exceptions.
ConcurrencyExceptionHandlingExecutorService
0 likes · 15 min read

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.
BackendEnumExceptionHandling
0 likes · 19 min read

This article explains Java asynchronous programming by first showing the limitations of the JDK5 Future interface, then demonstrating how CountDownLatch can coordinate tasks, and finally presenting CompletableFuture creation, result retrieval, callback chaining, exception handling, and multi‑task composition with practical code examples.
CompletableFutureConcurrencyExceptionHandling
0 likes · 20 min read

This guide explains how to use @ControllerAdvice and @RestControllerAdvice for unified exception handling in Spring, compares their behavior, demonstrates local versus global handling, and shows advanced filtering by annotation, controller class, or package with practical code examples.
@ControllerAdviceBackendExceptionHandling
0 likes · 6 min read

This article explains why tasks submitted with ExecutorService.submit silently swallow exceptions, how ExecutorService.execute prints them, and presents three practical solutions—including try‑catch, a custom ThreadFactory with UncaughtExceptionHandler, and overriding afterExecute—to reliably capture and process thread‑pool errors in Java.
ConcurrencyExceptionHandlingExecutorService
0 likes · 14 min read

This article explains how to design and implement a unified exception handling framework in Spring Boot applications, covering background, the use of @ControllerAdvice and @ExceptionHandler, custom assertion utilities, error response structures, handling of various exception types, and practical validation examples with code snippets.
ExceptionHandlingJavaSpringBoot
0 likes · 22 min read

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.
BackendExceptionHandlingJava
0 likes · 20 min read

This article explains how to refactor a Spring MVC Controller layer by introducing a unified response format, leveraging ResponseBodyAdvice for automatic wrapping, applying JSR‑303 validation for request parameters, and centralizing exception handling to produce clean, maintainable backend code.
ControllerExceptionHandlingJava
0 likes · 17 min read

This article explains how to refactor a Spring MVC Controller layer by defining its responsibilities, introducing a unified response format, using ResponseBodyAdvice for automatic wrapping, applying JSR‑303 validation for request parameters, and implementing custom exceptions with centralized handling to achieve cleaner, more maintainable backend code.
ControllerExceptionHandlingResponseBodyAdvice
0 likes · 17 min read

This article explains why tasks submitted to a Java ThreadPool via submit do not print exceptions, how to retrieve them using Future.get(), and presents three practical solutions—including try‑catch, Thread.setDefaultUncaughtExceptionHandler, and overriding afterExecute—to reliably capture and process thread pool exceptions.
ConcurrencyExceptionHandlingExecutorService
0 likes · 14 min read

This article explains how to replace repetitive try‑catch blocks in Java Spring applications with a unified exception handling strategy that leverages @ControllerAdvice, custom Assert utilities, enum‑based error codes, and standardized response objects to improve code readability, maintainability, and internationalisation.
EnumExceptionHandlingJava
0 likes · 21 min read

The article presents comprehensive best‑practice guidelines for building a clean, maintainable Controller layer in Spring MVC, covering its essential responsibilities, common pitfalls, unified response structures, parameter validation with JSR‑303, custom validators, and centralized exception handling to improve code simplicity and robustness.
BackendControllerExceptionHandling
0 likes · 19 min read

This article explains how to improve the Controller layer in Spring applications by separating responsibilities, implementing unified response structures with Result wrappers, handling String response issues via ResponseBodyAdvice, applying parameter validation with JSR‑303, customizing validators, and centralizing exception handling for cleaner, more maintainable backend code.
ControllerExceptionHandlingJava
0 likes · 18 min read

This article explains how to refactor Spring MVC Controller code by introducing a unified response format, handling String and JSON return types with ResponseBodyAdvice, applying parameter validation using JSR‑303, and implementing custom exceptions with centralized exception handling to simplify business logic and improve code maintainability.
ControllerExceptionHandlingResponseBodyAdvice
0 likes · 20 min read

This article explains how to replace repetitive try‑catch blocks in Spring applications with a unified exception handling mechanism based on @ControllerAdvice, custom assertion utilities, and enum‑driven business exceptions, while also showing how to standardize response structures and integrate internationalization.
@ControllerAdviceEnumExceptionHandling
0 likes · 11 min read

This article examines how ScheduledThreadPoolExecutor can lose exception information and stop rescheduling periodic tasks when a task throws an exception, by walking through the source code flow, the runAndReset logic, and the resulting behavior.
ConcurrencyExceptionHandlingJava
0 likes · 3 min read

This article explains how to centralize exception handling in Spring applications using @ControllerAdvice, replace repetitive null‑checks with Assert utilities, and combine enums with custom BusinessException classes to create a clean, maintainable backend error‑handling strategy.
@ControllerAdviceEnumExceptionHandling
0 likes · 10 min read

This article explains why tasks submitted to a Java thread pool via submit do not print exceptions, how to retrieve those exceptions using Future.get, and presents three practical solutions—including try‑catch, Thread.setDefaultUncaughtExceptionHandler, and overriding afterExecute—to reliably capture and process thread‑pool errors.
ExceptionHandlingExecutorServiceThreadPool
0 likes · 14 min read

This article explains how to improve Spring MVC controller logic by separating responsibilities, introducing a unified response structure, handling String return types with ResponseBodyAdvice, applying JSR‑303 validation, creating custom validators, and using custom exceptions with global exception handling to produce concise and maintainable backend code.
ControllerExceptionHandlingJava
0 likes · 18 min read

This article explains how to refactor Spring MVC controller code by introducing a unified response structure, handling String response issues with ResponseBodyAdvice, applying JSR‑303 validation, creating custom validation annotations, and implementing custom exceptions with global exception handling to produce cleaner, more maintainable backend services.
ControllerExceptionHandlingJava
0 likes · 18 min read

This article demonstrates how Spring's @Transactional annotation rolls back only for RuntimeException subclasses, explains why checked exceptions like Exception do not trigger rollback by default, and shows how to configure rollbackFor to handle custom exceptions, illustrated with SQL updates and Java code examples.
ExceptionHandlingJavaSQL
0 likes · 5 min read

This tutorial demonstrates how to replace verbose manual checks in Java services with Spring's javax.validation annotation‑based validation, covering built‑in constraints, Maven setup, DTO annotations, validation groups, custom validators, and a global exception handler for unified error responses.
AnnotationsExceptionHandlingJava
0 likes · 13 min read

FutureTask acts as a proxy for asynchronous tasks in Java, providing result retrieval with optional timeout, completion checks, cancellation, and repeat execution, while managing task state, outcomes, and exceptions; the article illustrates usage, internal fields, and common pitfalls such as missed exceptions and indefinite blocking.
ConcurrencyExceptionHandlingFutureTask
0 likes · 5 min read

This article explains how ThreadPoolExecutor's execute and submit methods differ in exception handling, why execute may terminate a worker thread while submit silently swallows exceptions, and provides code examples and recommendations for proper error handling in Java concurrency.
ConcurrencyExceptionHandlingExecutorService
0 likes · 6 min read

This article explains how to handle controller parameters, implement unified status codes with ResultVo, apply @Validated for request validation, and use @RestControllerAdvice together with ResponseBodyAdvice to automatically wrap responses and centralize exception handling in a Spring Boot backend.
ControllerExceptionHandlingResponseWrapper
0 likes · 18 min read

This article explains how to replace repetitive try‑catch blocks in Java Spring applications with a clean, centralized exception handling strategy using @ControllerAdvice, custom Assert utilities, and enum‑based error codes, while also showing how to return consistent error responses across services.
@ControllerAdviceExceptionHandlingJava
0 likes · 25 min read

This article explains why uncaught exceptions cause thread pool threads to terminate, demonstrates experiments with execute and submit methods, and shows how catching exceptions or using Future.get() can preserve thread reuse in Java concurrency.
ExceptionHandlingExecutorServiceJava
0 likes · 8 min read

This article demonstrates how to implement global exception handling in a SpringBoot project, covering environment setup, Maven dependencies, custom error interfaces, enums, exception classes, response wrappers, and controller advice, along with testing via Postman to verify handling of custom, null pointer, and generic exceptions.
ExceptionHandlingGlobalExceptionHandlingJava
0 likes · 14 min read

This article demonstrates how to set up global exception handling in a SpringBoot application by preparing the development environment, adding Maven dependencies, defining a base error interface, custom enums, exception classes, a unified response body, and a controller advice that captures business, null‑pointer, and generic exceptions, followed by testing the implementation with Postman.
ExceptionHandlingGlobalExceptionHandlingJava
0 likes · 14 min read

This article explains how the @ControllerAdvice annotation is discovered and utilized within Spring MVC, detailing the initialization process, the caching of @ExceptionHandler, @ModelAttribute, and @InitBinder methods, and how these global configurations are applied by RequestMappingHandlerAdapter during request handling.
@ControllerAdviceAnnotationsBackend
0 likes · 12 min read

This article demonstrates how to build a clean Spring Boot backend API by adding the web starter, using Hibernate Validator for parameter checks, handling validation errors with global exception handling, defining custom exceptions, and standardizing responses with a unified ResultVO and response‑code enum.
ExceptionHandlingSpringBootValidator
0 likes · 19 min read

This article demonstrates how to implement a merchant registration backend feature that supports uploading multiple images with preview using Spring MVC's MultipartFile, including controller handling, front‑end HTML/JS code, configuration for file size limits, and global exception handling.
ExceptionHandlingFileUploadJava
0 likes · 7 min read

This article explains Java's BigDecimal class, covering its purpose, constructors, common methods, formatting techniques, handling of non‑terminating division, and best‑practice recommendations, while providing clear code examples and practical tips for accurate high‑precision arithmetic.
ArithmeticExceptionHandlingNumberFormat
0 likes · 19 min read

Learn how to enable Spring's @Async support, configure custom executors, use @Async with void and Future return types, and implement custom exception handling for uncaught async errors, providing a complete guide to asynchronous method execution in Spring applications.
ExceptionHandlingExecutorSpring
0 likes · 4 min read

This guide shows how to create a custom HttpRequestRetryHandler that intelligently retries failed HTTP calls—handling timeouts, connection errors, SSL issues, and idempotent requests—and integrates it into a CloseableHttpClient built with a connection pool and custom request configuration.
BackendConnectionPoolExceptionHandling
0 likes · 5 min read

This article provides an in‑depth overview of Java thread pools, covering core concepts, typical interview questions, creation via ThreadPoolExecutor, execution flow, rejection policies, work‑queue types, common pool implementations, exception handling strategies, and pool state transitions, all illustrated with code examples and diagrams.
ExceptionHandlingExecutorServiceJava
0 likes · 17 min read

This article explains Java's exception hierarchy, distinguishes checked from unchecked exceptions, illustrates common pitfalls of overusing throws, and provides best‑practice guidelines for handling, documenting, and wrapping checked exceptions to improve API design and application robustness.
APIDesignBestPracticesCheckedException
0 likes · 14 min read


21CTONov 30, 2015 · Backend Development
This article explains why APIs are valuable assets, outlines the essential traits of a good API, and provides a step‑by‑step design process—including requirements gathering, naming, documentation, performance considerations, exception handling, and refactoring examples—illustrated with Java code snippets.
APIBestPracticesDesign
0 likes · 14 min read
