rename com.imyeyu.server to com.imyeyu.api

This commit is contained in:
Timi
2025-07-22 15:26:14 +08:00
parent e816b885b2
commit 323e038e86
340 changed files with 1174 additions and 1175 deletions

View File

@@ -0,0 +1,35 @@
package com.imyeyu.api.config;
import jakarta.validation.constraints.NotNull;
import lombok.extern.slf4j.Slf4j;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.scheduling.annotation.EnableAsync;
import java.util.Arrays;
/**
* 异步线程池配置
*
* @author 夜雨
* @since 2023-08-21 16:22
*/
@Slf4j
@EnableAsync
@Configuration
public class AsyncConfig implements AsyncConfigurer {
@Override
public @NotNull AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
return (e, method, obj) -> {
log.info("Exception message - {}", e.getMessage());
log.info("Method name - {}", method.getName());
log.info("Parameter values - {}", Arrays.toString(obj));
if (e instanceof Exception exception) {
log.info("exception: {}", exception.getMessage());
}
log.error("async uncaught error", e);
};
}
}