Skip to content

Duplicate calls of a custom HandlerInterceptor's methods after updating spring to 5.3.1

Notifications You must be signed in to change notification settings

lwitzani/springIssue26378

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This sample project demonstrates what is described in this spring issue: https://github.com/spring-projects/spring-framework/issues/26378 There are two branches in this project. One that works (with old Spring Boot / Spring version) and one that doesn't (with newer versions)

To test, just make a post (e.g via the application called postman) to the URL http://localhost:8080/cars/ (port might be different on your system)

Order of logged statements when using a version < Spring Boot 2.4.0 / Spring 5.3.1
ActivityLoggerInterceptor : ############## ACTUAL preHandle
CarController : ############## ACTUAL controller method
ActivityLoggerInterceptor : ############## ACTUAL afterCompletion


Order of logged statements when using a version >= Spring Boot 2.4.0 / Spring 5.3.1
ActivityLoggerInterceptor : ############## ACTUAL preHandle
ActivityLoggerInterceptor : ############## DUPLICATED preHandle
CarController : ############## ACTUAL controller method
ActivityLoggerInterceptor : ############## ACTUAL afterCompletion
ActivityLoggerInterceptor : ############## DUPLICATED afterCompletion

About

Duplicate calls of a custom HandlerInterceptor's methods after updating spring to 5.3.1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages