Redirected request when throwing an exception

in my application (using spring)

I am trying to call a method from a view using spring exposingBean. and when I try to call a method from a view, it throws an error. I am trying to catch a HandlerExceptionResolver but no luck, I think the HandlerExceptionResolver handler could not be handled because the exception was not passed to the controller.

so I will try another way to redirect the request when an exception is thrown. and I think the aspect has the opportunity to do it. Is it possible to redirect a request when an exception is thrown from an aspect?

+3
source share
1 answer

, HandlerExceptionResolver , . .

- HandlerInterceptor afterCompletion, , . , , .

, . .

, - bean JSP. , , , . , , . , , , , .

, , , . HTTP- , . , - "".

+4
source

Source: https://habr.com/ru/post/1779816/


All Articles