当前位置:网站首页>6.3 handlerexceptionresolver exception handling (in-depth analysis of SSM and project practice)

6.3 handlerexceptionresolver exception handling (in-depth analysis of SSM and project practice)

2020-11-06 01:21:00 Memory

All the source code in the project can be found in the linked repository :https://github.com/chenhaoxiang/uifuture-ssm

6.3 HandlerExceptionResolver exception handling

The component is Spring MVC Technical secondary school is responsible for handling abnormal components ,HandlerExceptionResolver The function of is to set according to the exception ModelAndView Back to . It can be parsed and processed Spring MVC The interface is implemented by mapping or objects that throw exceptions during program execution , Catch exception to return error view . The class that implements the interface will generally be in Spring Context is registered as Bean.

6.3.1 HandlerExceptionResolver Source code

Code list 6-13:HandlerExceptionResolver Interface source code

public interf

版权声明
本文为[Memory]所创,转载请带上原文链接,感谢