推进框架中的模块注册机制。引入 ByteBuddy 完成针对模块的代理实现。

- 调整部分包结构
- 重构 AgentRegisterContext ,将不同的 Context 内容按照对应模块进行封装
- 调整了‘添加可扫描包’的添加逻辑、新增了添加外部目录的扫描逻辑
- 新增几个异常类
- 在 ModuleCheckFactory 中新增了对于执行模块‘是否实现无参构造方法’的校验逻辑
- 引入 ByteBuddy 库负责构造执行模块实例,并添加对应的hook逻辑
- 调整 ModuleRegisterFactory 的逻辑,允许注册加载Module内的Hook方法
- 调整依赖引用关系,因为Partner-Main、Partner-Demo都继承自Partner-Api包,故将通用依赖移动至Api的pom文件中
This commit is contained in:
2025-08-05 01:01:42 +08:00
parent ca3ffca4ea
commit 507917157d
25 changed files with 423 additions and 149 deletions

View File

@@ -12,11 +12,6 @@
<artifactId>Partner-Test-Demo</artifactId>
<dependencies>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.10.2</version>
</dependency>
<dependency>
<groupId>work.slhaf</groupId>
<artifactId>Partner-Api</artifactId>