import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestControllerAdvice;
/**
- @author java
*/
@Slf4j
@RestControllerAdvice
public class ApplicationExceptionHandler {
protected static final Logger logger = LoggerFactory.getLogger(ApplicationExceptionHandler.class);
private final LogUtil logUtil;
@Autowired
public ApplicationExceptionHandler(LogUtil logUtil) {
this.logSaveUtil = logSaveUtil;
}
/**
* 异常详细信息
*
* @return BaseResponse
*/
@ExceptionHandler(MsgException.class)
public BaseResponse msgException(Throwable t) {
BaseResponse response &