Skip to content

分布式下,默认WxMpServiceApacheHttpClientImpl的实现,刷新token冲突 #324

@nickwongwong

Description

@nickwongwong

https://github.com/Wechat-Group/weixin-java-tools/blob/2b019f15cb8116e63166aef8bc42e0c88dcf5f15/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpServiceApacheHttpClientImpl.java#L69-L73
(WxMpConfigStorage是数据库式的)在forceRefresh下,先将token过期然后再请求新的,在这一个请求空档期,其他机器将无法获取token,导致业务的失败

建议改成先刷新token,不要先设置有效期

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions