WxJava
WxJava copied to clipboard
Verify and document useStableAccessToken configuration behavior
Issue
Users reported that the wx.miniapp.use-stable-access-token: true configuration was not taking effect in version 4.7.0, with the code still returning useStableAccessToken as false.
Investigation Results
Through comprehensive testing and code analysis, I confirmed that the configuration is working correctly in the current version (4.7.7.B). The issue appears to have been resolved in releases between 4.7.0 and 4.7.7.B.
Verification
Created comprehensive test applications that validate:
// Property binding works correctly
wx.miniapp.use-stable-access-token=true
// Configuration flows through all layers:
WxMaProperties.isUseStableAccessToken() → true
WxMaConfig.isStableAccessToken() → true
WxMaService.getWxMaConfig().isStableAccessToken() → true
The configuration chain works as intended:
- Spring Boot binds kebab-case property to
WxMaProperties.useStableAccessToken AbstractWxMaConfigStorageConfigurationreads viaproperties.isUseStableAccessToken()- Sets value on config via
config.useStableAccessToken(boolean) BaseWxMaServiceImpl.getAccessToken()correctly uses the setting to choose endpoints
Outcome
No code changes were required. The configuration works correctly in the current version. Users experiencing this issue should upgrade to version 4.7.7.B or newer.
Testing confirmed bidirectional property binding works for both true and false values across all storage configurations (Memory, Redis, Redisson).
Fixes binarywang/WxJava#3696
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.