添加获取指定路径文件信息的 API

This commit is contained in:
zhaojun1998
2020-01-28 14:55:06 +08:00
parent 38b811f8e6
commit b6a2e3ccb8
8 changed files with 91 additions and 3 deletions

View File

@@ -46,9 +46,9 @@ public class GlobleExceptionHandler {
* 不存在的文件异常
*/
@ExceptionHandler({NotExistFileException.class})
@ResponseStatus(HttpStatus.NOT_FOUND)
public String notExistFile(Exception ex) {
return "error/404";
@ResponseBody
public ResultBean notExistFile(Exception ex) {
return ResultBean.error("文件不存在");
}
/**