mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-25 12:22:03 +08:00
redis锁
This commit is contained in:
@@ -20,11 +20,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) {
|
||||
|
||||
@@ -20,13 +20,13 @@ public class AppConfigController {
|
||||
@Autowired
|
||||
private AppConfigService configService;
|
||||
|
||||
@GetMapping("/")
|
||||
@GetMapping("")
|
||||
public JsonResponse index() {
|
||||
List<AppConfig> configs = configService.allShow();
|
||||
return JsonResponse.data(configs);
|
||||
}
|
||||
|
||||
@PutMapping("/")
|
||||
@PutMapping("")
|
||||
public JsonResponse save(@RequestBody AppConfigRequest req) {
|
||||
configService.saveFromMap(req.getData());
|
||||
return JsonResponse.data(null);
|
||||
|
||||
Reference in New Issue
Block a user