| | |
| | | package com.chinaztt.mes.docx.handler; |
| | | |
| | | import com.chinaztt.mes.docx.util.R; |
| | | 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 R<?> exception(Exception e) { |
| | | return R.failed(e.getMessage()); |
| | | public Result<?> exception(Exception e) { |
| | | return Result.failed(e.getMessage()); |
| | | } |
| | | } |