Skip to content

Commit abaaa40

Browse files
committed
fix GlobalDefaultExceptionHandler
1 parent e9b7e9c commit abaaa40

File tree

2 files changed

+4
-70
lines changed

2 files changed

+4
-70
lines changed
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
package com.softdev.system.generator.config;
22

3-
import com.softdev.system.generator.entity.ReturnT;
3+
import com.softdev.system.generator.entity.vo.ResultVo;
4+
import jakarta.servlet.http.HttpServletRequest;
45
import org.springframework.web.bind.annotation.ControllerAdvice;
56
import org.springframework.web.bind.annotation.ExceptionHandler;
67
import org.springframework.web.bind.annotation.ResponseBody;
78

8-
import jakarta.servlet.http.HttpServletRequest;
9-
109
/**
1110
* @author zhengkai.blog.csdn.net
1211
*/
@@ -15,9 +14,9 @@ public class GlobalDefaultExceptionHandler {
1514

1615
@ExceptionHandler(Exception.class)
1716
@ResponseBody
18-
public ReturnT defaultExceptionHandler(HttpServletRequest req, Exception e) {
17+
public ResultVo defaultExceptionHandler(HttpServletRequest req, Exception e) {
1918
e.printStackTrace();
20-
return ReturnT.error("代码生成失败:"+e.getMessage());
19+
return ResultVo.error("代码生成失败:"+e.getMessage());
2120
}
2221

2322
}

generator-web/src/main/java/com/softdev/system/generator/entity/ReturnT.java

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)