-
-
Notifications
You must be signed in to change notification settings - Fork 9k
refactor:将微信公众号存储自动配置拆分为独立的存储类型配置类,并新增Redisson支持 #3833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
auggie review |
🤖 Augment PR SummarySummary: This PR refactors the MP(公众号)配置存储自动配置,按存储类型拆分为独立配置类,并新增可选的 Redisson 存储实现。 Changes:
Technical Notes: 存储类型选择由“集中 switch”改为“条件装配(type 配置 + classpath 检测)”,便于后续扩展更多存储实现。 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...ava/com/binarywang/solon/wxjava/mp/config/storage/WxMpInJedisConfigStorageConfiguration.java
Show resolved
Hide resolved
...ava/com/binarywang/solon/wxjava/mp/config/storage/WxMpInJedisConfigStorageConfiguration.java
Show resolved
Hide resolved
...va/com/binarywang/solon/wxjava/mp/config/storage/AbstractWxMpConfigStorageConfiguration.java
Show resolved
Hide resolved
...mp-solon-plugin/src/main/java/com/binarywang/solon/wxjava/mp/integration/WxMpPluginImpl.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...va/com/binarywang/solon/wxjava/mp/config/storage/AbstractWxMpConfigStorageConfiguration.java
Show resolved
Hide resolved
...ava/com/binarywang/solon/wxjava/mp/config/storage/WxMpInJedisConfigStorageConfiguration.java
Show resolved
Hide resolved
...narywang/spring/starter/wxjava/mp/config/storage/WxMpInMemoryConfigStorageConfiguration.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
本 PR 将微信公众号存储自动配置进行了重构,将原本集中在单一配置类中的逻辑拆分为独立的存储类型配置类,并新增了 Redisson 支持。主要改进包括提高了代码的模块化程度、增强了可维护性,以及添加了 HTTP 请求重试配置。
主要变更:
- 新增
maxRetryTimes和retrySleepMillis配置属性,支持 HTTP 请求重试机制 - 创建抽象基类
AbstractWxMpConfigStorageConfiguration统一配置逻辑 - 将存储配置拆分为独立的配置类:Memory、Jedis、RedisTemplate、Redisson
- 新增 Redisson 存储支持
- 将 Jedis 和 Redisson 依赖范围从
compile改为provided
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/properties/WxMpProperties.java | 新增 HTTP 请求重试相关配置属性(maxRetryTimes 和 retrySleepMillis) |
| spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/config/storage/AbstractWxMpConfigStorageConfiguration.java | 创建抽象基类,统一处理存储配置的公共逻辑,包括代理配置、HTTP 客户端超时、重试机制和 Host 配置 |
| spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/config/storage/WxMpInMemoryConfigStorageConfiguration.java | 内存存储配置类,作为默认存储方式 |
| spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/config/storage/WxMpInJedisConfigStorageConfiguration.java | Jedis 存储配置类,支持通过配置或容器获取 JedisPool |
| spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/config/storage/WxMpInRedisTemplateConfigStorageConfiguration.java | RedisTemplate 存储配置类 |
| spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/config/storage/WxMpInRedissonConfigStorageConfiguration.java | 新增 Redisson 存储配置类,支持通过配置或容器获取 RedissonClient |
| spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/config/WxMpStorageAutoConfiguration.java | 重构为导入各独立存储配置类的入口类,移除原有的集中式配置逻辑 |
| spring-boot-starters/wx-java-mp-spring-boot-starter/pom.xml | 新增 Redisson 依赖,并将 Jedis 和 Redisson 的 scope 改为 provided |
| solon-plugins/wx-java-mp-solon-plugin/src/main/java/com/binarywang/solon/wxjava/mp/properties/WxMpProperties.java | 与 Spring Boot 版本同步,新增重试配置属性 |
| solon-plugins/wx-java-mp-solon-plugin/src/main/java/com/binarywang/solon/wxjava/mp/config/storage/AbstractWxMpConfigStorageConfiguration.java | Solon 版本的抽象基类,处理基本配置和重试机制 |
| solon-plugins/wx-java-mp-solon-plugin/src/main/java/com/binarywang/solon/wxjava/mp/config/storage/WxMpInMemoryConfigStorageConfiguration.java | Solon 版本的内存存储配置 |
| solon-plugins/wx-java-mp-solon-plugin/src/main/java/com/binarywang/solon/wxjava/mp/config/storage/WxMpInJedisConfigStorageConfiguration.java | Solon 版本的 Jedis 存储配置 |
| solon-plugins/wx-java-mp-solon-plugin/src/main/java/com/binarywang/solon/wxjava/mp/config/storage/WxMpInRedissonConfigStorageConfiguration.java | Solon 版本的 Redisson 存储配置 |
| solon-plugins/wx-java-mp-solon-plugin/src/main/java/com/binarywang/solon/wxjava/mp/integration/WxMpPluginImpl.java | 更新插件初始化逻辑,使用新的独立存储配置类 |
| solon-plugins/wx-java-mp-solon-plugin/src/main/java/com/binarywang/solon/wxjava/mp/config/WxMpStorageAutoConfiguration.java | 删除原有的集中式配置类 |
| solon-plugins/wx-java-mp-solon-plugin/pom.xml | 与 Spring Boot 版本同步,新增 Redisson 依赖并调整依赖范围 |
.../com/binarywang/solon/wxjava/mp/config/storage/WxMpInRedissonConfigStorageConfiguration.java
Outdated
Show resolved
Hide resolved
...inarywang/spring/starter/wxjava/mp/config/storage/WxMpInJedisConfigStorageConfiguration.java
Outdated
Show resolved
Hide resolved
...narywang/spring/starter/wxjava/mp/config/storage/WxMpInMemoryConfigStorageConfiguration.java
Outdated
Show resolved
Hide resolved
...g/spring/starter/wxjava/mp/config/storage/WxMpInRedisTemplateConfigStorageConfiguration.java
Outdated
Show resolved
Hide resolved
.../com/binarywang/solon/wxjava/mp/config/storage/WxMpInRedissonConfigStorageConfiguration.java
Show resolved
Hide resolved
...rywang/spring/starter/wxjava/mp/config/storage/WxMpInRedissonConfigStorageConfiguration.java
Outdated
Show resolved
Hide resolved
.../com/binarywang/solon/wxjava/mp/config/storage/WxMpInRedissonConfigStorageConfiguration.java
Outdated
Show resolved
Hide resolved
...narywang/spring/starter/wxjava/mp/config/storage/WxMpInMemoryConfigStorageConfiguration.java
Outdated
Show resolved
Hide resolved
...narywang/spring/starter/wxjava/mp/config/storage/AbstractWxMpConfigStorageConfiguration.java
Outdated
Show resolved
Hide resolved
...rywang/spring/starter/wxjava/mp/config/storage/WxMpInRedissonConfigStorageConfiguration.java
Outdated
Show resolved
Hide resolved
|
auggie review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...mp-solon-plugin/src/main/java/com/binarywang/solon/wxjava/mp/integration/WxMpPluginImpl.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...narywang/spring/starter/wxjava/mp/config/storage/WxMpInMemoryConfigStorageConfiguration.java
Show resolved
Hide resolved
|
augment review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...narywang/spring/starter/wxjava/mp/config/storage/AbstractWxMpConfigStorageConfiguration.java
Outdated
Show resolved
Hide resolved
|
augment review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.../com/binarywang/solon/wxjava/mp/config/storage/WxMpInRedissonConfigStorageConfiguration.java
Show resolved
Hide resolved
...rywang/spring/starter/wxjava/mp/config/storage/WxMpInRedissonConfigStorageConfiguration.java
Outdated
Show resolved
Hide resolved
|
augment review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review completed. No suggestions at this time.
Comment augment review to trigger a new review at any time.
No description provided.