zouyu
2026-04-03 625c4f2816d171bbe8cf264e23d3bec0c11e3b86
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());
    }
}