解决注解初始化逻辑不自动执行问题

This commit is contained in:
2025-06-03 16:08:52 +08:00
parent 3d6f322da5
commit 61402bfac7
3 changed files with 44 additions and 2 deletions

9
README.md Normal file
View File

@ -0,0 +1,9 @@
# 使用方式
在主入口函数增加如下注解:
```bash
@Import(value = { cn.zhangdeman.HashMapCache.class}) // 让SpringBoot能够扫描到相关组件
```
会自动扫描自定义的异常注解, 并进行数据初始化