Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 14, 2026

实现计划

  • 理解问题:当前 wx-open-starter 只支持单个微信开放平台配置,需要支持多个第三方平台
  • 分析现有实现:研究 wx-java-mp-multi-spring-boot-starter 的多账号模式
  • 创建新模块 wx-java-open-multi-spring-boot-starter
    • 创建模块目录结构
    • 创建 pom.xml 文件
    • 创建属性配置类(Properties)
    • 创建服务管理类(MultiServices)
    • 创建配置类(Configuration)
    • 创建自动配置类(AutoConfiguration)
    • 创建存储配置类(Storage Configurations)
    • 创建 Spring Boot 自动配置文件
    • 创建 README.md 文档
  • 更新父 pom.xml,将新模块加入构建列表
  • 编译和测试
    • 运行完整编译验证
    • 运行 checkstyle 验证
    • 运行完整打包验证
  • 代码审查和安全检查
    • 第一轮代码审查反馈修复
    • 第二轮代码审查反馈修复
      • 修改 StorageType 枚举为小写命名(memory, jedis, redisson, redistemplate)
      • 修改 HttpClientType 枚举为小写命名(httpclient)
      • 更新所有作者信息为 "Binary Wang"
      • 更新 README.md 文档中的枚举值说明
      • 修复枚举默认值引用

变更说明

根据代码审查反馈,对枚举命名进行了统一规范:

  1. StorageType 枚举:从大写改为小写(MEMORY → memory, JEDIS → jedis, REDISSON → redisson, REDIS_TEMPLATE → redistemplate)
  2. HttpClientType 枚举:从大写改为小写(HTTP_CLIENT → httpclient),与单账号版本保持一致
  3. 作者信息:统一更新为 "Binary Wang"
  4. 文档更新:README.md 中的配置说明已更新为小写枚举值

这些修改确保了与项目现有 wx-java-open-spring-boot-starter 单账号版本的命名风格保持一致。

Original prompt

This section details on the original issue you should resolve

<issue_title>如果一个项目想要接多个第三方平台,wx-open-starter好像不支持</issue_title>
<issue_description>如果一个项目想要接多个第三方平台,wx-open-starter好像不支持</issue_description>

Comments on the Issue (you are @copilot in this section)

Custom agent used: 全部用中文
需要用中文,包括PR标题和分析总结过程


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 14, 2026 03:58
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix support for multiple third-party platforms in wx-open-starter 新增 wx-java-open-multi-spring-boot-starter 支持多开放平台配置 Jan 14, 2026
Copilot AI requested a review from binarywang January 14, 2026 04:04
@binarywang binarywang marked this pull request as ready for review January 14, 2026 04:05
Copilot AI review requested due to automatic review settings January 14, 2026 04:05
@augmentcode
Copy link

augmentcode bot commented Jan 14, 2026

🤖 Augment PR Summary

PR 总结:本次 PR 新增了 wx-java-open-multi-spring-boot-starter,用于在同一项目中支持多个微信开放平台(第三方平台)配置与按租户获取对应 WxOpenService

主要变更:

  • spring-boot-starters/pom.xml 中新增 wx-java-open-multi-spring-boot-starter 子模块
  • 新增多账号属性模型:WxOpenMultiProperties + wx.open.apps.{tenantId}.* 的配置方式
  • 新增服务管理接口与实现:WxOpenMultiServices/WxOpenMultiServicesImpl,通过 tenantId 获取对应 WxOpenService
  • 新增自动装配入口与配置聚合:WxOpenMultiAutoConfigurationWxOpenMultiServiceConfiguration
  • 提供 4 种 ConfigStorage 策略:memory、jedis、redisson、redis_template(基于条件装配切换)
  • 在初始化阶段增加 appId 唯一性校验与必填参数校验(appId/secret),避免多租户下 token/ticket 缓存冲突
  • 支持统一配置 Redis key 前缀、HTTP 代理与重试/超时等参数,并写入 starter README 示例

技术要点:整体实现参考了现有 multi-starter 模式,将每个租户的 app 配置装配成独立的 WxOpenService 实例并集中管理。

🤖 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. 2 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

binarywang and others added 10 commits January 14, 2026 17:06
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…c/main/java/com/binarywang/spring/starter/wxjava/open/configuration/services/WxOpenInJedisConfiguration.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…c/main/java/com/binarywang/spring/starter/wxjava/open/properties/WxOpenSingleProperties.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…c/main/java/com/binarywang/spring/starter/wxjava/open/properties/WxOpenMultiProperties.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…c/main/java/com/binarywang/spring/starter/wxjava/open/properties/WxOpenMultiProperties.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…c/main/java/com/binarywang/spring/starter/wxjava/open/service/WxOpenMultiServices.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…c/main/java/com/binarywang/spring/starter/wxjava/open/configuration/services/WxOpenInMemoryConfiguration.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…c/main/java/com/binarywang/spring/starter/wxjava/open/configuration/services/WxOpenInRedissonConfiguration.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…c/main/java/com/binarywang/spring/starter/wxjava/open/configuration/services/WxOpenInRedisTemplateConfiguration.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
1. 修复 README.md sentinel 文档说明,明确当前版本暂不支持 sentinel 配置
2. 移除无效的 httpClientType 配置,因为 WxOpen 只有一种 HTTP 客户端实现
3. 注释顺序已在之前修复中正确排列
@binarywang binarywang merged commit 6a9852f into develop Jan 15, 2026
1 check was pending
@binarywang binarywang deleted the copilot/fix-multiple-platform-support branch January 15, 2026 03:07
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.

如果一个项目想要接多个第三方平台,wx-open-starter好像不支持

2 participants