Compare commits
5
Commits
52366425a6
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d56e55a038 | ||
|
|
8819b8481e | ||
|
|
fa4d6e0549 | ||
|
|
6dde9aa414 | ||
|
|
e5fdc84192 |
@@ -0,0 +1,4 @@
|
||||
.idea
|
||||
target
|
||||
*.iml
|
||||
*.log
|
||||
@@ -1,3 +1,30 @@
|
||||
# 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 工具类
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user