yaowanxin
9 天以前 e58fbf25c7a6827888e830533ecfc8c26b893308
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());
    }
}