首页>代码>基于Spring Boot+Layui+mybatis开发垃圾分类管理系统>/garbage-collection-project/src/main/java/com/garbage/demo/common/BaseExceptionHandler.java
package com.garbage.demo.common;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@RestControllerAdvice
@Slf4j
public class BaseExceptionHandler {
@ExceptionHandler(value = Exception.class)
public Result exception(Exception e){
log.error("异常信息:{}", e.getMessage());
return Result.getFailure().setData(e.getMessage());
}
}
最近下载更多
最近浏览更多
梁小贤 LV1
5月22日
sbsjsk
2024年10月24日
暂无贡献等级
krispeng LV15
2024年9月30日
黄志琴 LV1
2024年9月29日
yimaoermao LV1
2024年9月14日
kgl234 LV2
2024年8月17日
微信网友_7096619637297152
2024年7月26日
暂无贡献等级
17380184110
2024年6月20日
暂无贡献等级
计科一班 LV7
2024年6月19日
fengst
2024年6月18日
暂无贡献等级

