New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HandlerInterceptorAdapter should honor ordering #22434
Comments
It wasn't a fix really, but more of a clean-up. Can you explain the problem you're having? |
It’s a feature to be honest. The problem is that I’m importing a starter that we have and I need to put an interceptor in the middle of those and since interceptors don’t honor |
I think you're referring to #20179 which is a change in the Spring Framework. To my knowledge there isn't anything specific in Boot on top of that. If we did backport that how would it help your case? Wouldn't the interceptors in the imported starter have to make use of the (new) order property so you can insert in the middle? |
They are all using ordered but since I checked the class I mention in this case the class is only using an array list and inserting in the order they came. This will really help my case if you make it honor ordered. Thanks in advance. |
I also think that making it respect the order interface as you are doing in all the other places is a more clear solution that to hack it calling a method that receives the order provided by the method implemented in the class that implements the interface. Just my two cents here. |
The ac68cc3 change sorts |
Ok, let me explain a little bit. I'm using spring boot 1.5.15 which depends on spring-webmvc 4.3.18 When I register my Handler interceptor in the class: InterceptorRegistry I see this code that is not honoring @order which all of my HandlerInterceptorAdapters are implementing
I'm facing the problem that, despite of having the correct order in my config, another HandlerInterceptor is being called before the one that is supposed to be called. Does this explanation makes more sense? To give a little more context, if you check the latest version of the registry it does honor @ordered Would it be possible to backport this to the latest version of 4.x that is or will be included in the latest version of the spring boot starter 1.x that includes mvc? Thanks for your time. |
Okay thanks. BTW the reason for |
It makes sense but it won’t hurt having extra options. Do you think that this change is going to be part of 4.x or you won’t port this back? |
Fixed via dba9c90 |
Affects: <Spring Framework version>
Hi, I've found that this feature was introduced in in Spring 5.x. Would it be possible to backport this to Spring 4.x and also to Spring boot 1.5.x?
this is the fix that needs to be backported.
782c595
Thanks.
The text was updated successfully, but these errors were encountered: