In order to realize some special business, I rewrote the RequestMappingHandlerMapping#registerHandlerMethod, like

@Override
protected void registerHandlerMethod(Object handler, Method method, RequestMappingInfo mapping) {
    //dosomething...
    if (xx) {
        //dosomething...
    } else {
        super.registerHandlerMethod(handler, method, mapping);
    }
}

This code is no problem under spring-boot 2.2.0 (not included)

However, when I upgrade the spring-boot version of the newly version (above 2.2.0), this method will directly call the object itself when calling super.


super → this ↑ ←― ↓


Current spring-boot version: spring 5.0.6.RELEASE spring-boot 2.0.2.RELEASE

Comment From: bclozel

This is likely to be a Spring Framework issue rather than a Spring Boot issue since that class belongs here. Could you provide a sample application that shows the problem so that we can take a look into this?

Comment From: rstoyanchev

Do you mean that upgrading from Spring Framework 5.0.6 to Spring Framework 5.2.0 works but upgrading to 5.2.1 or higher doesn't?

I don't see anything in the Spring Framework that could cause this. It is a one line method and it hasn't changed in 5 years. Please provide a sample or more details.

Comment From: zhangmingshuang

@bclozel @rstoyanchev i'm sorry reply this so late. this problem jar is a long time ago,unattended , privatization . so i can't provide a sample application that shows the problem. i try to reproduce the code in a simple application, but this problem can't reproduce. i'll apply to get this jar outside. and create the application of github. and i'll reply to you guys next.

Comment From: rstoyanchev

Maybe you can debug it to see what's causing the recursion or looping, or perhaps show some of the stacktrace.

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.