BusinessExceptionHandler.java
616 Bytes
package com.glsx.smart.exception;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
/**
* <p>Description:
* <p>Project: chejia-smart
*
* @author wbh
* @date 2021-03-16
*/
@RestControllerAdvice
public class BusinessExceptionHandler {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@ExceptionHandler(BusinessException.class)
public void handleBusinessException(BusinessException e) {
logger.error("!!!! ERROR", e);
}
}