In spring-boot version 3.2.3, interceptors are not called in order of addition in InterceptorRegistry #39796
Labels
for: external-project
For an external project and not something we can fix
status: invalid
An issue that we don't feel is valid
Some changes happened in new spring-boot 3.2.3 library, to align with the new version I changed my application code
"class Appconfig extends WebMvcConfigurerAdapter" changed to "class AppConfig implements WebMvcConfigurer" and
"class AppTenantInterceptor extends HandlerInterceptorAdapter" changed to "class TenantInterceptor implements HandlerInterceptor"
because above spring classes (WebMvcConfigurerAdapter, HandlerInterceptorAdapter) are removed hence we had to do these changes.
now with these changes in multitenant application we are adding the interceptors in below order
so it should be called in sequence however, during logout tenantInterceptor & cmsInterceptor are not getting called before invoking EventListener below.
@eventlistener(condition = "#event.info.getState() == T(com.app.mod.event.state.UserSessionInfo.State).LOGOUT")
public void onUserLogout(UserSessionState event){...}
In Old spring-boot 2.7.18 request going in order of addition in InterceptorRegistry as expected and working fine in our application.
Kindly look at this issue and share if you have any suggestion or fix to make it work like before as it was working in old spring-boot
The text was updated successfully, but these errors were encountered: