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.
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: wilkinsona
The code that you're asking about is part of Spring Framework (none of it is in an org.springframework.boot package) so please raise a Spring Framework issue.