mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-09 08:57:17 +08:00
style: 优化部分注释及注解使用
This commit is contained in:
@@ -33,7 +33,7 @@ import java.util.List;
|
||||
public class CorsProperties {
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
* 是否启用跨域配置
|
||||
*/
|
||||
private boolean enabled = false;
|
||||
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package top.charles7c.continew.starter.core.autoconfigure.threadpool;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
@@ -40,16 +41,13 @@ import java.util.concurrent.ScheduledExecutorService;
|
||||
@Slf4j
|
||||
@Lazy
|
||||
@AutoConfiguration
|
||||
@RequiredArgsConstructor
|
||||
@ConditionalOnProperty(prefix = "thread-pool", name = "enabled", havingValue = "true")
|
||||
@EnableAsync(proxyTargetClass = true)
|
||||
public class AsyncAutoConfiguration implements AsyncConfigurer {
|
||||
|
||||
private final ScheduledExecutorService scheduledExecutorService;
|
||||
|
||||
public AsyncAutoConfiguration(ScheduledExecutorService scheduledExecutorService) {
|
||||
this.scheduledExecutorService = scheduledExecutorService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步任务 @Async 执行时,使用 Java 内置线程池
|
||||
*/
|
||||
|
@@ -31,7 +31,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
public class ThreadPoolProperties {
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
* 是否启用线程池配置
|
||||
*/
|
||||
private boolean enabled = false;
|
||||
|
||||
|
Reference in New Issue
Block a user