mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-07-24 02:09:35 +08:00
异常处理
This commit is contained in:
parent
6e65fc9aa0
commit
e70301bdbf
@ -37,11 +37,11 @@ import java.util.List;
|
||||
@Slf4j
|
||||
public class ExceptionController {
|
||||
|
||||
// @ExceptionHandler(Exception.class)
|
||||
// public JsonResponse exceptionHandler(Exception e) {
|
||||
// log.error(e.getMessage());
|
||||
// return JsonResponse.error("系统错误", 500);
|
||||
// }
|
||||
@ExceptionHandler(Exception.class)
|
||||
public JsonResponse exceptionHandler(Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return JsonResponse.error("系统错误", 500);
|
||||
}
|
||||
|
||||
@ExceptionHandler(ServiceException.class)
|
||||
public JsonResponse serviceExceptionHandler(ServiceException e) {
|
||||
|
@ -43,11 +43,9 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> implements CourseService {
|
||||
|
||||
@Autowired
|
||||
private CourseDepartmentService courseDepartmentService;
|
||||
@Autowired private CourseDepartmentService courseDepartmentService;
|
||||
|
||||
@Autowired
|
||||
private ResourceCourseCategoryService courseCategoryService;
|
||||
@Autowired private ResourceCourseCategoryService courseCategoryService;
|
||||
|
||||
@Override
|
||||
public PaginationResult<Course> paginate(int page, int size, CoursePaginateFiler filter) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user