feat(image): 实现 Markdown 图片文件名同步

- 新增 ImageName 实体类和对应的 Mapper- 在 MarkdownFileService 中添加图片文件名同步方法
- 优化 HomePage 组件,支持实时预览 Markdown 内容
- 新增 MarkdownImageExtractor 工具类,用于提取 Markdown 中的图片文件名
This commit is contained in:
ikmkj
2025-08-01 22:25:36 +08:00
parent 165bd5ea92
commit 15091c315e
10 changed files with 271 additions and 27 deletions

View File

@@ -0,0 +1,24 @@
package com.test.bijihoudaun.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Executor;
@Configuration
@EnableAsync
public class AsyncConfig {
@Bean("imageNameSyncExecutor")
public Executor imageNameSyncExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(5);
executor.setMaxPoolSize(10);
executor.setQueueCapacity(100);
executor.setThreadNamePrefix("imageNameSync-");
executor.initialize();
return executor;
}
}