copilot-swe-agent[bot]
0fa17f485e
为四个WxCpService实现类添加getMsgAuditAccessToken方法
- 在WxCpServiceApacheHttpClientImpl中实现getMsgAuditAccessToken方法
- 在WxCpServiceHttpComponentsImpl中实现getMsgAuditAccessToken方法
- 在WxCpServiceOkHttpImpl中实现getMsgAuditAccessToken方法,使用try-with-resources正确关闭Response
- 在WxCpServiceJoddHttpImpl中实现getMsgAuditAccessToken方法
所有实现遵循以下设计:
- 使用Lock机制和双重检查确保线程安全
- 使用会话存档secret(msgAuditSecret)获取access token
- 将token存储到updateMsgAuditAccessToken()
- 当msgAuditSecret未配置时抛出WxErrorException
- 保持各实现类原有的HTTP客户端使用风格和代理支持
新增单元测试WxCpServiceGetMsgAuditAccessTokenTest验证实现正确性,
包括正常场景和异常场景(secret未配置或为空)的测试。
2026-01-26 14:53:43 +00:00
..
2026-01-26 14:53:43 +00:00
2025-11-28 11:52:33 +08:00
2025-12-20 17:18:22 +08:00
2014-10-22 12:15:02 +08:00
2026-01-25 21:20:16 +08:00