refactor: 优化错误报告顺序

This commit is contained in:
zhouhao
2025-07-11 09:41:53 +08:00
parent cadf50a4c7
commit 323a651aa0

View File

@@ -5,9 +5,10 @@ import org.hswebframework.web.exception.analyzer.ExceptionAnalyzers;
import org.springframework.beans.BeansException;
import org.springframework.boot.SpringBootExceptionReporter;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.Ordered;
@Slf4j
public class GenericExceptionReport implements SpringBootExceptionReporter {
public class GenericExceptionReport implements SpringBootExceptionReporter , Ordered {
public GenericExceptionReport(ConfigurableApplicationContext context) {
@@ -19,4 +20,8 @@ public class GenericExceptionReport implements SpringBootExceptionReporter {
return ExceptionAnalyzers.analyze(failure);
}
@Override
public int getOrder() {
return Ordered.HIGHEST_PRECEDENCE;
}
}