上海郢昱
9 小时以前 0d9956362ef415d0b49318746e9a2ef955dcfebd
1
2
3
4
5
6
7
8
9
10
11
12
13
package com.hwtd.mes.collect.handler;
 
import com.hwtd.mes.collect.util.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
 
@RestControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler({Exception.class})
    public Result<?> exception(Exception e) {
        return Result.failed(e.getMessage());
    }
}