`

spring异常处理@ExceptionHandler

阅读更多
处理参数缺失:

@ExceptionHandler
	void handleMissingServletRequestParameterException(MissingServletRequestParameterException e, HttpServletResponse response) throws IOException {
		response.sendError(HttpStatus.BAD_REQUEST.value(), "Check request");
	}

 

参考:

1.http://haohaoxuexi.iteye.com/blog/1188161

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics