Fading Coder

One Final Commit for the Last Sprint

Spring MVC Interceptor Implementation and Configuration Guide

Understanding Spring MVC Interceptors When building web applications with traditional JavaEE filters, developers often encounter a limitation. Filters execute before the Servlet layer, which means with Spring MVC's single entry point (DispatcherServlet), a filter would intercept all incoming request...

Spring Boot 3.3.1 Migration: HandlerInterceptor and WebMvcConfigurer Replacements

Interceptor Changes in Spring MVC The abstract class HandlerInterceptorAdapter was removed in Spring Boot 3.3.1. Earlier, you could extend this class; now you must implement the HandlerInterceptor interface directly. Before (Spring Boot 2.x): import javax.servlet.http.HttpServletRequest; import java...

Understanding java.lang.IllegalStateException: Cannot call sendError() after the response has been committed

Issue Analsyis The error java.lang.IllegalStateException: Cannot call sendError() after the response has been committed occurs when the response has already been committed (e.g., via sendRedirect) and then another attempt is made to modify it (e.g., via sendError). Example Code @Override public bool...

Advanced Techniques for MyBatis Interceptors in Data Operations

Intercepting Insert Operations A common use case involves inserting data into multiple rows simultaneously during a single operation. For instance, a pllatform administrator might need to replicate data across different country-specific records. Implementation: import lombok.extern.slf4j.Slf4j; impo...