zouyu
9 天以前 bf95078dab81dcd0639fdb1a41e998b31c940fb1
1
2
3
4
5
6
7
8
9
10
11
12
13
package com.chinaztt.mes.docx.handler;
 
import com.chinaztt.mes.docx.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());
    }
}