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
@Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(tenantInterceptor); registry.addInterceptor(cmsInterceptor); registry.addInterceptor(authorizationInterceptor); } 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. I raised issue 39796 in spring-boot repository but they redirected to spring-framework repository to raise the bug.
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
Comment From: snicoll
@eventlistener choosing such name as your GitHub user id really means you're bound to be notified one way or the other, albeit proper formatting from the OP would have avoided that.
@PrashantGuptaM please take the time to move that code in text into a sample that we can actually run. You can attach a zip to this issue or push the code to a GitHub repository.