zouyu
2025-06-05 4960c8975807c39be4b6ee97aac20e95b789df9a
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.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
 
@RestControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler({Exception.class})
    public R<?> exception(Exception e) {
        return R.failed(e.getMessage());
    }
}