Skip to content

Conversation

@buaazyl
Copy link
Contributor

@buaazyl buaazyl commented Jan 6, 2026

No description provided.

@binarywang binarywang requested a review from Copilot January 6, 2026 09:00
@binarywang
Copy link
Owner

auggie review

@augmentcode
Copy link

augmentcode bot commented Jan 6, 2026

🤖 Augment PR Summary

Summary: This PR refactors the MP(公众号)配置存储自动配置,按存储类型拆分为独立配置类,并新增可选的 Redisson 存储实现。

Changes:

  • Solon:移除集中式 WxMpStorageAutoConfiguration,新增 Memory/Jedis/Redisson 三种存储配置类并按条件加载。
  • Spring Boot:将 WxMpStorageAutoConfiguration 简化为 @Import,导入 Memory/Jedis/RedisTemplate/Redisson 的配置类。
  • 新增抽象基类,统一注入 appId/secret/token/aesKey、代理配置、useStableAccessToken 等通用配置。
  • Spring Boot 侧基类额外集中处理 Apache HttpClient 超时配置与 hosts 覆盖(如 apiHost/mpHost/openHost)。
  • 新增 Redisson 支持:当选择 type=redisson 时构建 RedissonClient 并使用 WxMpRedissonConfigImpl
  • Maven 依赖调整:Jedis 改为 provided,并新增 Redisson 为 provided,保持存储后端为可选依赖。

Technical Notes: 存储类型选择由“集中 switch”改为“条件装配(type 配置 + classpath 检测)”,便于后续扩展更多存储实现。

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Copy link

Copilot AI left a 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 请求重试配置。

主要变更:

  • 新增 maxRetryTimesretrySleepMillis 配置属性,支持 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 依赖并调整依赖范围

@buaazyl
Copy link
Contributor Author

buaazyl commented Jan 6, 2026

auggie review

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@binarywang
Copy link
Owner

augment review

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@buaazyl
Copy link
Contributor Author

buaazyl commented Jan 6, 2026

augment review

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@buaazyl
Copy link
Contributor Author

buaazyl commented Jan 6, 2026

augment review

Copy link

@augmentcode augmentcode bot left a 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.

@binarywang binarywang merged commit e572ddf into binarywang:develop Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants