5 Commits
Author SHA1 Message Date
wonder d56e55a038 📝Docs: [hutool-core-config] Completed 2025-11-10 21:59:41 +08:00
wonder 8819b8481e 📝Docs: [executor-service-config] Completed 2025-11-10 21:41:23 +08:00
wonder fa4d6e0549 📝Docs: [basic-async-config] Completed 2025-11-10 18:59:10 +08:00
wonder 6dde9aa414 🔄Update: 初始化搭建 2025-11-10 13:30:45 +08:00
wonder e5fdc84192 📝Docs: 项目大纲更新 2025-11-10 13:12:18 +08:00
4 changed files with 111 additions and 1 deletions
+4
View File
@@ -0,0 +1,4 @@
.idea
target
*.iml
*.log
+28 -1
View File
@@ -1,3 +1,30 @@
# spring-boot-threadpool-demo # spring-boot-threadpool-demo
📚 适用于 SpringBoot 的多种线程池实现 > 📚 适用于 SpringBoot 的多种线程池实现
**注意:Main 分支不包含具体实现,具体实现在项目的不同分支上**
## 分支大纲
### 分支 1: `basic-async-config`
> ✅ Completed
**主题:基础 @Async 注解方式**
- 实现简单的异步任务执行
- 配置基本的线程池参数
- 配置拒绝策略
- 测试异步方法调用
### 分支 2: `executor-service-config`
> ✅ Completed
- Java 自带线程池
- 无限队列长度
### 分支 3: `hutool-core-config`
> ✅ Completed
- 简单易用的 Hutool 工具类
+68
View File
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cn.hezhaohui</groupId>
<artifactId>spring-boot-threadpool</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.2</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Maven Compiler Plugin,用于编译 Java 代码 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>3.2.2</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,11 @@
package cn.hezhaohui.threadpool;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ThreadPoolApplication {
public static void main(String[] args) {
SpringApplication.run(ThreadPoolApplication.class, args);
}
}