是的,您应该有一种方法
MissingServletRequestParameterException
您可以通过以下几种方式进行操作:
1)
@ExceptionHandler(MissingServletRequestParameterException.class) public String handleMyException(Exception exception) { return "yourErrorViewName"; }2)
<error-page> <exception-type>org.springframework.web.bind.MissingServletRequestParameterException</exception-type> <location>/WEB-INF/pages/myError.jsp</location> </error-page>
希望能帮助到你。



