spring异常
来源:互联网 发布:移动云商城 源码 编辑:程序博客网 时间:2024/06/02 01:04
*** SpringMVC自定义异常对应的status code
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)
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>
0 0
- spring异常
- spring 异常
- spring 异常
- Spring异常
- spring异常
- spring异常
- spring异常
- spring spring 各种异常
- spring 问题 启动异常
- spring+hibernate相关异常
- Spring异常处理
- Spring中的异常处理器
- Spring:SimpleMappingExceptionResolver异常处理
- spring常见异常
- spring validation 异常备忘
- Spring 代理自定义异常
- Spring Aop 异常
- spring quartz 异常!!
- Android开发技术周报 Issue61笔记
- Android多线程编程
- 算法设计题2.33-线性表-第2章-《数据结构习题集》-严蔚敏吴伟民版
- Moore’s Voting Algorithm
- 深入理解C++中的异常处理机制
- spring异常
- 拓展:小学生算术能力测试系统
- emoji 表情图片解决方法
- eclipse maven插件使用POM.XML异常
- 关于nsdata的压缩的问题base64,图片转字符串,图片的压缩的问题
- 多线程开发之NSOperation
- Linux文件及目录命名规则
- 通过aidl实现传送远程服务中的对象
- Http相关 --概念