Exception HTTP Status Code
ConversionNotSupportedException 500 (Internal Server Error)
HttpMediaTypeNotAcceptableException 406 (Not Acceptable)
HttpMediaTypeNotSupportedException 415 (Unsupported Media Type)
HttpMessageNotReadableException 400 (Bad Request)
HttpMessageNotWritableException 500 (Internal Server Error)
HttpRequestMethodNotSupportedException 405 (Method Not Allowed)
MissingServletRequestParameterException 400 (Bad Request)
NoSuchRequestHandlingMethodException 404 (Not Found)
TypeMismatchException 400 (Bad Request)
<property name="exceptionMappings">
<props>
<!-- 這裏你可以根據需要定義N多個錯誤異常轉發 -->
<prop key="java.sql.SQLException">dbError</prop> <!-- 數據庫錯誤(dbError.jsp) -->
<prop key="org.springframework.web.bind.ServletRequestBindingException">bizError</prop> <!-- 參數綁定錯誤(如:必須參數沒傳遞)(bizError.jsp) -->
<prop key="java.lang.IllegalArgumentException">bizError</prop> <!-- 參數錯誤(bizError.jsp) -->
<prop key="org.springframework.validation.BindException">bizError</prop> <!-- 參數類型有誤(bizError.jsp) -->
<prop key="java.lang.Exception">unknowError</prop> <!-- 其他錯誤爲'未定義錯誤'(unknowError.jsp) -->
</props>
</property>