2020
10-09
10-09
SpringMVC异常处理器编写及配置
一、编写自定义异常类(作为提示信息)@DatapublicclassSysExceptionextendsException{privateStringmessage;publicSysException(Stringmessage){this.message=message;}}二、编写异常处理器publicclassSysExceptionResolveimplementsHandlerExceptionResolver{@OverridepublicModelAndViewresolveException(HttpServletRequesthttpServletRequest,HttpServletResponsehttpServ...
继续阅读 >