Spring 3 - Create ExceptionHandler for NoSuchRequestHandlingMethodException

前端 未结 3 741
一整个雨季
一整个雨季 2021-01-31 09:18

Using Spring 3, I like to create an exception handler using the ExceptionHandler annotation that will handle \"no page found (404)\" requests.

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-31 10:00

    You could go with this approach, it is great idea and works, necessity to throw exceptions only withing particular Handler makes @ExceptionHandler not so useful as it looks.

提交回复
热议问题