diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a738bab
--- /dev/null
+++ b/README.md
@@ -0,0 +1,9 @@
+# 使用方式
+
+在主入口函数增加如下注解:
+
+```bash
+@Import(value = { cn.zhangdeman.HashMapCache.class}) // 让SpringBoot能够扫描到相关组件
+```
+
+会自动扫描自定义的异常注解, 并进行数据初始化
diff --git a/pom.xml b/pom.xml
index 05f9c40..2500ad2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,6 +24,12 @@
lombok
1.18.30
+
+ jakarta.servlet
+ jakarta.servlet-api
+ 6.1.0
+ provided
+
junit
junit
diff --git a/src/main/java/cn/zhangdeman/HashMapCache.java b/src/main/java/cn/zhangdeman/HashMapCache.java
index ce6ca93..a7ba6b9 100644
--- a/src/main/java/cn/zhangdeman/HashMapCache.java
+++ b/src/main/java/cn/zhangdeman/HashMapCache.java
@@ -1,6 +1,9 @@
package cn.zhangdeman;
import cn.zhangdeman.annotation.CustomExceptionScanAnnotation;
+import jakarta.servlet.ServletContextEvent;
+import jakarta.servlet.ServletContextListener;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.util.ClassUtils;
@@ -12,16 +15,18 @@ import java.util.*;
// 基于hashmap实现的内存缓存
// 因为就是服务启动时初始化一次, 无需考虑多线程并发安全问题
-public class HashMapCache {
+public class HashMapCache implements ServletContextListener {
// 单例: 饿汉模式
private static final HashMapCache hashMapCache = new HashMapCache();
private final Map