build 3.1.0.bate2

This commit is contained in:
bootx
2025-11-17 18:23:21 +08:00
parent 94aa9e13a4
commit f369736e73
1144 changed files with 30257 additions and 27267 deletions

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>cn.bootx.platform</groupId>
<artifactId>bootx-platform-common</artifactId>
<version>3.0.0.beta5</version>
<version>3.1.0.beta2</version>
</parent>
<artifactId>common-exception-handler</artifactId>

View File

@@ -12,7 +12,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
*/
@Getter
@Setter
@ConfigurationProperties("bootx.common.exception")
@ConfigurationProperties("bootx-platform.common.exception")
public class ExceptionHandlerProperties {
/** 是否显示详细异常信息 */

View File

@@ -173,7 +173,7 @@ public class RestExceptionHandler {
@ExceptionHandler(NullPointerException.class)
public Result<Void> handleNullPointerException(NullPointerException ex) {
log.warn("空指针 ", ex);
return Res.response(CommonErrorCode.SYSTEM_ERROR, "数据错误", MDC.get(CommonCode.TRACE_ID));
return Res.response(CommonErrorCode.SYSTEM_ERROR, "数据错误", MDC.get(CommonCode.TRACE_ID));
}
/**
@@ -204,6 +204,9 @@ public class RestExceptionHandler {
*/
@ExceptionHandler(Throwable.class)
public Result<Void> handleThrowable(Throwable ex) {
if (properties.isShowFullMessage()){
return Res.response(CommonErrorCode.SYSTEM_ERROR, ex.getMessage(), MDC.get(CommonCode.TRACE_ID));
}
log.error("系统错误 {}", ex.getMessage(), ex);
return Res.response(CommonErrorCode.SYSTEM_ERROR, "系统错误", MDC.get(CommonCode.TRACE_ID));
}