What's the replacement for Spring's deprecated NoSuchRequestHandlingMethodException?

NoSuchRequestHandlingMethodException

deprecated in Spring 4.3, in favor of annotated handler methods . What does it mean? The exception is still listed in the documentation without mentioning its deprecated status. If I understand correctly, this exception is thrown if there is no request handler for the given request. Seems to be handled here DefaultExceptionHandlerResolver

, and the related method is deprecated as well.

If this method is deprecated, can I assume that Spring no longer throws this exception? How can I replace this functionality with annotation based exception handling? What exception should I handle if not recommended?

Side note: I also noticed a new NoHandlerFoundException

one here . Is it a replacement? If so, why? It seems to be doing the same. And why aren't exceptions related to other HTTP status codes deprecated? None of this makes a lot of sense.

+3


source to share





All Articles