@ResponseStatus(value = HttpStatus.METHOD_NOT_ALLOWED)
@ExceptionHandler(HttpRequestMethodNotSupportedException.class)
//对于接口方法不匹配的异常处理
public BasicResult handleHttpRequestMethodNotSupportedException(
HttpRequestMethodNotSupportedException e) {
logError("httpRequestMethodNotSupportedException", e.getMessage(), e);
return BasicResult
.fail(BasicResultCode.METHOD_NOT_ALLOW_ERROR.getCode(),
BasicResultCode.METHOD_NOT_ALLOW_ERROR.getMsg(),
e.getMessage());
}
LocAdviceErrorAutoConfiguration.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:loc-framework
作者:
评论列表
文章目录